Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
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
pseer
gxpt_ht
Commits
a6e50096
Commit
a6e50096
authored
Jan 13, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改重新验卷自动任务
parent
2214de02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
CouponRetryTask.java
...artz/src/main/java/share/quartz/task/CouponRetryTask.java
+14
-13
No files found.
share-quartz/src/main/java/share/quartz/task/CouponRetryTask.java
View file @
a6e50096
...
@@ -37,6 +37,19 @@ public class CouponRetryTask {
...
@@ -37,6 +37,19 @@ public class CouponRetryTask {
private
static
final
Integer
TRY_NUMBER
=
3
;
private
static
final
Integer
TRY_NUMBER
=
3
;
public
void
AuToRetryCoupon
()
{
public
void
AuToRetryCoupon
()
{
LambdaQueryWrapper
<
SConsumerCoupon
>
consumerCouponWrapper
=
new
LambdaQueryWrapper
<>();
consumerCouponWrapper
.
eq
(
SConsumerCoupon:
:
getUseStatus
,
UserStatusEnum
.
UNUSED
.
getCode
());
List
<
SConsumerCoupon
>
sConsumerCoupons
=
sConsumerCouponService
.
list
(
consumerCouponWrapper
);
List
<
SConsumerCoupon
>
expiredSConsumerCounpons
=
Optional
.
ofNullable
(
sConsumerCoupons
).
orElse
(
new
ArrayList
<>()).
stream
().
filter
(
item
->
{
if
(
item
.
getEndDate
().
compareTo
(
new
Date
())
<
0
)
{
item
.
setUseStatus
(
UserStatusEnum
.
EXPIRED
.
getCode
());
return
true
;
}
return
false
;
}).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
expiredSConsumerCounpons
))
{
sConsumerCouponService
.
updateBatchById
(
expiredSConsumerCounpons
);
}
LambdaQueryWrapper
<
CouponLog
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
CouponLog
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
CouponLog:
:
getStatus
,
YesNoEnum
.
no
.
getDisplay_3
());
queryWrapper
.
eq
(
CouponLog:
:
getStatus
,
YesNoEnum
.
no
.
getDisplay_3
());
queryWrapper
.
eq
(
CouponLog:
:
getNumber
,
TRY_NUMBER
);
queryWrapper
.
eq
(
CouponLog:
:
getNumber
,
TRY_NUMBER
);
...
@@ -77,18 +90,6 @@ public class CouponRetryTask {
...
@@ -77,18 +90,6 @@ public class CouponRetryTask {
sConsumerCouponService
.
updateById
(
sConsumerCoupon
);
sConsumerCouponService
.
updateById
(
sConsumerCoupon
);
}
}
});
});
LambdaQueryWrapper
<
SConsumerCoupon
>
consumerCouponWrapper
=
new
LambdaQueryWrapper
<>();
consumerCouponWrapper
.
eq
(
SConsumerCoupon:
:
getUseStatus
,
UserStatusEnum
.
UNUSED
.
getCode
());
List
<
SConsumerCoupon
>
sConsumerCoupons
=
sConsumerCouponService
.
list
(
consumerCouponWrapper
);
List
<
SConsumerCoupon
>
expiredSConsumerCounpons
=
Optional
.
ofNullable
(
sConsumerCoupons
).
orElse
(
new
ArrayList
<>()).
stream
().
filter
(
item
->
{
if
(
item
.
getEndDate
().
compareTo
(
new
Date
())
<
0
){
item
.
setUseStatus
(
UserStatusEnum
.
EXPIRED
.
getCode
());
return
true
;
}
return
false
;
}).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
expiredSConsumerCounpons
)){
sConsumerCouponService
.
updateBatchById
(
expiredSConsumerCounpons
);
}
}
}
}
}
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