|
|
|
@@ -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<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) { |
|
|
|
merchantList = merchantList.stream().filter( |
|
|
|
m->m.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode())) |
|
|
|
|