Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
85194a31
Commit
85194a31
authored
Nov 14, 2022
by
macro
Browse files
优惠券获取逻辑修改
parent
89c84ce8
Changes
1
Hide whitespace changes
Inline
Side-by-side
mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberCouponServiceImpl.java
View file @
85194a31
...
...
@@ -189,19 +189,18 @@ public class UmsMemberCouponServiceImpl implements UmsMemberCouponService {
List
<
Long
>
couponIds
=
cpcrList
.
stream
().
map
(
SmsCouponProductCategoryRelation:
:
getCouponId
).
collect
(
Collectors
.
toList
());
allCouponIds
.
addAll
(
couponIds
);
}
if
(
CollUtil
.
isEmpty
(
allCouponIds
)){
return
new
ArrayList
<>();
}
//所有优惠券
SmsCouponExample
couponExample
=
new
SmsCouponExample
();
couponExample
.
createCriteria
().
andEndTimeGreaterThan
(
new
Date
())
.
andStartTimeLessThan
(
new
Date
())
.
andUseTypeEqualTo
(
0
);
couponExample
.
or
(
couponExample
.
createCriteria
()
.
andEndTimeGreaterThan
(
new
Date
())
.
andStartTimeLessThan
(
new
Date
())
.
andUseTypeNotEqualTo
(
0
)
.
andIdIn
(
allCouponIds
));
if
(
CollUtil
.
isNotEmpty
(
allCouponIds
)){
couponExample
.
or
(
couponExample
.
createCriteria
()
.
andEndTimeGreaterThan
(
new
Date
())
.
andStartTimeLessThan
(
new
Date
())
.
andUseTypeNotEqualTo
(
0
)
.
andIdIn
(
allCouponIds
));
}
return
couponMapper
.
selectByExample
(
couponExample
);
}
...
...
Write
Preview
Supports
Markdown
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