From ea4593adbc81f7f0161e66c8fa6687841ffee363 Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Fri, 19 Apr 2019 20:37:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20todo=20=20=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E6=B2=A1=E6=9C=89=E4=BC=98=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/mall/promotion/biz/service/CouponServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/CouponServiceImpl.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/CouponServiceImpl.java index b690dddb6..4b4825c3b 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/CouponServiceImpl.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/CouponServiceImpl.java @@ -254,6 +254,8 @@ public class CouponServiceImpl implements CouponService { public CommonResult> getCouponCardList(Integer userId, List spus) { // 查询用户未使用的优惠劵列表 List cards = couponCardMapper.selectListByUserIdAndStatus(userId, CouponCardStatusEnum.UNUSED.getValue()); + + // TODO: 2019-04-19 芋艿 如果没有优惠券,处理 Map templates = couponTemplateMapper.selectListByIds(cards.stream().map(CouponCardDO::getTemplateId).collect(Collectors.toSet())) .stream().collect(Collectors.toMap(CouponTemplateDO::getId, template -> template)); // 逐个判断是否可用