| @@ -60,6 +60,9 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| @Autowired | @Autowired | ||||
| WxMerchantMapper wxMerchantMapper; | WxMerchantMapper wxMerchantMapper; | ||||
| @Autowired | |||||
| WxMerchantService wxMerchantService; | |||||
| @Lazy | @Lazy | ||||
| @Autowired | @Autowired | ||||
| WxCouponChannelService wxCouponChannelService; | WxCouponChannelService wxCouponChannelService; | ||||
| @@ -229,10 +232,15 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| @Override | @Override | ||||
| public WxCouponCVo getVoById(Long id,String tenantId) { | public WxCouponCVo getVoById(Long id,String tenantId) { | ||||
| WxCouponCVo wxCouponCVo = wxCouponMapper.findVoDetail(id,tenantId); | WxCouponCVo wxCouponCVo = wxCouponMapper.findVoDetail(id,tenantId); | ||||
| if(wxCouponCVo == null){ | if(wxCouponCVo == null){ | ||||
| return null; | return null; | ||||
| } | } | ||||
| List<WxMerchantVo> merchantList = wxCouponCVo.getMerchantVoList(); | |||||
| List<Long> couponIdList = new ArrayList<Long>(); | |||||
| couponIdList.add(wxCouponCVo.getId()); | |||||
| Map<Long, List<WxMerchantVo>> couponMerchantVoMap = wxMerchantService.findCouponMerchantVoList(couponIdList, wxCouponCVo,true); | |||||
| List<WxMerchantVo> merchantList = couponMerchantVoMap.get(wxCouponCVo.getId()); | |||||
| if (merchantList != null) { | if (merchantList != null) { | ||||
| merchantList = merchantList.stream().filter( | merchantList = merchantList.stream().filter( | ||||
| m->m.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode())) | m->m.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode())) | ||||