|
@@ -215,22 +215,14 @@ public class CouponServiceImpl implements CouponService {
|
|
|
filterCoupon(source, product, notCouponList);
|
|
|
//超级会员优惠券移除
|
|
|
if (notCouponList != null && notCouponList.size() > 0) {
|
|
|
- for (CouponVo couponVo : notCouponList) {
|
|
|
- if (vipCoupon.contains(couponVo.getCouponId())) {
|
|
|
- notCouponList.remove(couponVo);
|
|
|
- }
|
|
|
- }
|
|
|
+ notCouponList.removeIf(couponVo -> vipCoupon.contains(couponVo.getCouponId()));
|
|
|
}
|
|
|
map.put("notCouponNum", notCouponList == null ? 0 : notCouponList.size());
|
|
|
//已领取
|
|
|
List<CouponVo> couponList = couponMapper.findCouponClub(userId, 1);
|
|
|
//超级会员优惠券移除
|
|
|
if (couponList != null && couponList.size() > 0) {
|
|
|
- for (CouponVo couponVo : couponList) {
|
|
|
- if (vipCoupon.contains(couponVo.getCouponId())) {
|
|
|
- notCouponList.remove(couponVo);
|
|
|
- }
|
|
|
- }
|
|
|
+ couponList.removeIf(couponVo -> vipCoupon.contains(couponVo.getCouponId()));
|
|
|
}
|
|
|
filterCoupon(source, product, couponList);
|
|
|
map.put("couponNum", couponList == null ? 0 : couponList.size());
|