|
|
|
@@ -209,14 +209,14 @@ public class WxCouponController extends BaseController { |
|
|
|
List<Long> couponIdList = new ArrayList<Long>(); |
|
|
|
couponIdList.add(couponChannel.getCouponId()); |
|
|
|
Map<Long, List<WxMerchantVo>> couponMerchantVoMap = merchantService.findCouponMerchantVoList(couponIdList, couponChannel,true); |
|
|
|
List<WxMerchantVo> merchantList = couponMerchantVoMap.get(couponChannel.getCouponId()); |
|
|
|
if (merchantList != null) { |
|
|
|
merchantList = merchantList.stream().filter( |
|
|
|
volist = couponMerchantVoMap.get(couponChannel.getCouponId()); |
|
|
|
if (volist != null) { |
|
|
|
volist = volist.stream().filter( |
|
|
|
m->m.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode())) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} |
|
|
|
if (null != merchantList && merchantList.size() > 0 ) { |
|
|
|
CouponCacheUtils.setCouponMerchantCache(redisTemplate, couponChannel.getCouponId(), merchantList); |
|
|
|
if (null != volist && volist.size() > 0 ) { |
|
|
|
CouponCacheUtils.setCouponMerchantCache(redisTemplate, couponChannel.getCouponId(), volist); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(volist); |
|
|
|
|