From 7d1c56d78a40346f6b15b7d4388c0baf46235265 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 9 Feb 2022 11:05:21 +0800 Subject: [PATCH] =?UTF-8?q?/=E3=80=82ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxCouponServiceImpl.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java index 34d349bb7..ea8088deb 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java @@ -60,6 +60,9 @@ public class WxCouponServiceImpl implements WxCouponService { @Autowired WxMerchantMapper wxMerchantMapper; + @Autowired + WxMerchantService wxMerchantService; + @Lazy @Autowired WxCouponChannelService wxCouponChannelService; @@ -229,10 +232,15 @@ public class WxCouponServiceImpl implements WxCouponService { @Override public WxCouponCVo getVoById(Long id,String tenantId) { WxCouponCVo wxCouponCVo = wxCouponMapper.findVoDetail(id,tenantId); + if(wxCouponCVo == null){ return null; } - List merchantList = wxCouponCVo.getMerchantVoList(); + List couponIdList = new ArrayList(); + couponIdList.add(wxCouponCVo.getId()); + Map> couponMerchantVoMap = wxMerchantService.findCouponMerchantVoList(couponIdList, wxCouponCVo,true); + + List merchantList = couponMerchantVoMap.get(wxCouponCVo.getId()); if (merchantList != null) { merchantList = merchantList.stream().filter( m->m.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode()))