记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
ba088ce5
Commit
ba088ce5
authored
Dec 09, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~opt;
parent
b26fb389
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
38 deletions
+37
-38
CandyMgtCouponTaskController.java
...m/controller/candy/task/CandyMgtCouponTaskController.java
+37
-38
No files found.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/candy/task/CandyMgtCouponTaskController.java
View file @
ba088ce5
...
@@ -42,53 +42,52 @@ public class CandyMgtCouponTaskController {
...
@@ -42,53 +42,52 @@ public class CandyMgtCouponTaskController {
mgtCoupon
.
setState
(
9
);
mgtCoupon
.
setState
(
9
);
mgtCoupon
.
setUpdatedAt
(
now
);
mgtCoupon
.
setUpdatedAt
(
now
);
}
}
platformCandyMgtCouponService
.
updateBatchById
(
list
);
if
(
platformCandyMgtCouponService
.
updateBatchById
(
list
))
{
for
(
int
i
=
0
;
i
<
taskSize
;
i
++)
{
CandyMgtCoupon
mgtCoupon
=
list
.
get
(
i
);
for
(
int
i
=
0
;
i
<
taskSize
;
i
++)
{
try
{
CandyMgtCoupon
mgtCoupon
=
list
.
get
(
i
);
LambdaQueryWrapper
<
CandyCoupon
>
couponLambdaQueryWrapper
=
Wrappers
.
lambdaQuery
(
CandyCoupon
.
class
)
.
eq
(
CandyCoupon:
:
getState
,
1
).
eq
(
CandyCoupon:
:
getCouponId
,
mgtCoupon
.
getCouponId
());
try
{
CandyCoupon
coupon
=
platformCandyCouponService
.
getOne
(
couponLambdaQueryWrapper
);
LambdaQueryWrapper
<
CandyCoupon
>
couponLambdaQueryWrapper
=
Wrappers
.
lambdaQuery
(
CandyCoupon
.
class
)
.
eq
(
CandyCoupon:
:
getState
,
1
).
eq
(
CandyCoupon:
:
getCouponId
,
mgtCoupon
.
getCouponId
());
CandyCoupon
coupon
=
platformCandyCouponService
.
getOne
(
couponLambdaQueryWrapper
);
log
.
info
(
"发放券任务总数:{},任务{}开始处理[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]"
,
taskSize
,
i
,
log
.
info
(
"发放券任务总数:{},任务{}开始处理[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
(),
coupon
.
getBindType
(),
mgtCoupon
.
getEventAmt
(),
mgtCoupon
.
getEventType
());
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
(),
coupon
.
getBindType
(),
mgtCoupon
.
getEventAmt
(),
mgtCoupon
.
getEventType
());
switch
(
coupon
.
getCouType
())
{
switch
(
coupon
.
getCouType
())
{
case
1
:
// 代金券
case
1
:
// 代金券
platformCandyCouponService
.
issueCashCouponHandler
(
mgtCoupon
,
coupon
);
platformCandyCouponService
.
issueCashCouponHandler
(
mgtCoupon
,
coupon
);
break
;
break
;
case
2
:
// 满减券
case
2
:
// 满减券
platformCandyCouponService
.
issueOverMinusCouponHandler
(
mgtCoupon
,
coupon
);
platformCandyCouponService
.
issueOverMinusCouponHandler
(
mgtCoupon
,
coupon
);
break
;
break
;
case
3
:
// 兑换券
case
3
:
// 兑换券
platformCandyCouponService
.
issueExchangeCouponHandler
(
mgtCoupon
,
coupon
);
platformCandyCouponService
.
issueExchangeCouponHandler
(
mgtCoupon
,
coupon
);
break
;
break
;
case
4
:
// 折扣券
case
4
:
// 折扣券
platformCandyCouponService
.
issueDiscountCouponHandler
(
mgtCoupon
,
coupon
);
platformCandyCouponService
.
issueDiscountCouponHandler
(
mgtCoupon
,
coupon
);
break
;
break
;
case
101
:
// 优先券
case
101
:
// 优先券
platformCandyCouponService
.
issuePriorityCouponHandler
(
mgtCoupon
,
coupon
);
platformCandyCouponService
.
issuePriorityCouponHandler
(
mgtCoupon
,
coupon
);
break
;
break
;
default
:
default
:
log
.
warn
(
"发放券任务总数:{},任务{}无法处理,无效的券类型[mcouponId:{},couType:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
());
log
.
warn
(
"发放券任务总数:{},任务{}无法处理,无效的券类型[mcouponId:{},couType:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
());
break
;
break
;
}
}
mgtCoupon
.
setState
(
1
);
mgtCoupon
.
setState
(
1
);
boolean
update
=
platformCandyMgtCouponService
.
updateById
(
mgtCoupon
);
boolean
update
=
platformCandyMgtCouponService
.
updateById
(
mgtCoupon
);
log
.
info
(
"发放券任务总数:{},任务{}处理{}[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]"
,
taskSize
,
i
,
(
update
?
"成功"
:
"失败"
),
log
.
info
(
"发放券任务总数:{},任务{}处理{}[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]"
,
taskSize
,
i
,
(
update
?
"成功"
:
"失败"
),
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
(),
coupon
.
getBindType
(),
mgtCoupon
.
getEventAmt
(),
mgtCoupon
.
getEventType
());
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
(),
coupon
.
getBindType
(),
mgtCoupon
.
getEventAmt
(),
mgtCoupon
.
getEventType
());
pl
++;
pl
++;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"发放券任务总数:{},任务{}处理异常[mcouponId:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
e
);
log
.
error
(
"发放券任务总数:{},任务{}处理异常[mcouponId:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
e
);
}
}
}
}
}
log
.
info
(
"发放券任务总数:{},成功处理任务数:{} >>> END END END"
,
taskSize
,
pl
);
log
.
info
(
"发放券任务总数:{},成功处理任务数:{} >>> END END END"
,
taskSize
,
pl
);
return
ResponseDto
.
success
(
String
.
format
(
"发放券任务总数:%s,成功处理任务数:%s"
,
taskSize
,
pl
));
return
ResponseDto
.
success
(
String
.
format
(
"发放券任务总数:%s,成功处理任务数:%s"
,
taskSize
,
pl
));
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment