Commit 833cfe68 by 吕明尚

修改累计消费进行积分

parent af415ead
......@@ -305,12 +305,16 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
.in(SOrder::getStatus, OrderStatusEnum.getValidOrderStatus())
.eq(SOrder::getIsDelete, YesNoEnum.no.getIndex()));
if (CollectionUtil.isEmpty(orderList)) {
logger.debug("订单为空");
logger.debug("订单为空");
return;
}
Map<Long, SCoupon> sCouponMap = sCouponService.list().stream().collect(Collectors.toMap(SCoupon::getId, Function.identity()));
//优惠券id集合,去掉为null的
List<Long> ids = orderList.stream().map(SOrder::getCouponId).filter(Objects::nonNull).collect(Collectors.toList());
if (CollectionUtil.isEmpty(ids)) {
logger.debug("优惠券为空");
return;
}
List<SConsumerCoupon> consumerCouponList = consumerCouponService.selectByIds(ids).stream()
.filter(s -> s.getCouponType().equals(CouponTypeEnum.CASH.getCode())).collect(Collectors.toList());
consumerCouponList.stream().forEach(item -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment