记得上下班打卡 | 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
f17acf1e
Commit
f17acf1e
authored
Dec 09, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_20211205' into pre
parents
4d2f17d3
ba088ce5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
CandyMgtCouponTaskController.java
...m/controller/candy/task/CandyMgtCouponTaskController.java
+10
-6
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 @
f17acf1e
...
...
@@ -28,9 +28,10 @@ public class CandyMgtCouponTaskController {
@PutMapping
(
"issue/coupons"
)
public
ResponseDto
<
String
>
issueCoupons
()
{
LocalDateTime
now
=
LocalDateTime
.
now
();
LambdaQueryWrapper
<
CandyMgtCoupon
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
CandyMgtCoupon
.
class
)
.
eq
(
CandyMgtCoupon:
:
getState
,
0
)
.
le
(
CandyMgtCoupon:
:
getEventAt
,
LocalDateTime
.
now
()
)
.
le
(
CandyMgtCoupon:
:
getEventAt
,
now
)
.
orderByAsc
(
CandyMgtCoupon:
:
getEventAt
);
List
<
CandyMgtCoupon
>
list
=
platformCandyMgtCouponService
.
list
(
queryWrapper
);
int
taskSize
=
CollectionUtils
.
isEmpty
(
list
)
?
-
1
:
list
.
size
(),
pl
=
0
;
...
...
@@ -39,9 +40,13 @@ public class CandyMgtCouponTaskController {
for
(
int
i
=
0
;
i
<
taskSize
;
i
++)
{
CandyMgtCoupon
mgtCoupon
=
list
.
get
(
i
);
mgtCoupon
.
setState
(
9
);
mgtCoupon
.
setUpdatedAt
(
now
);
}
if
(
platformCandyMgtCouponService
.
updateBatchById
(
list
))
{
for
(
int
i
=
0
;
i
<
taskSize
;
i
++)
{
CandyMgtCoupon
mgtCoupon
=
list
.
get
(
i
);
try
{
if
(
platformCandyMgtCouponService
.
updateById
(
mgtCoupon
))
{
LambdaQueryWrapper
<
CandyCoupon
>
couponLambdaQueryWrapper
=
Wrappers
.
lambdaQuery
(
CandyCoupon
.
class
)
.
eq
(
CandyCoupon:
:
getState
,
1
).
eq
(
CandyCoupon:
:
getCouponId
,
mgtCoupon
.
getCouponId
());
CandyCoupon
coupon
=
platformCandyCouponService
.
getOne
(
couponLambdaQueryWrapper
);
...
...
@@ -77,13 +82,12 @@ public class CandyMgtCouponTaskController {
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
(),
coupon
.
getBindType
(),
mgtCoupon
.
getEventAmt
(),
mgtCoupon
.
getEventType
());
pl
++;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"发放券任务总数:{},任务{}处理异常[mcouponId:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
e
);
}
}
}
log
.
info
(
"发放券任务总数:{},成功处理任务数:{} >>> END END END"
,
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