|
|
|
@@ -238,10 +238,8 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private boolean isCouponMerchantValid(Long couponId) { |
|
|
|
Map paramMap = new HashMap<>(); |
|
|
|
paramMap.put("productId",couponId); |
|
|
|
List<WxMerchantVo> merchantVoList = wxCouponMerchantMapper.findMerchantNameList(paramMap); |
|
|
|
private boolean isCouponMerchantValid(Long couponId,String tenantId) { |
|
|
|
List<WxMerchantVo> merchantVoList = wxCouponMerchantMapper.findMerchantNameList(couponId,tenantId); |
|
|
|
if (merchantVoList.stream().anyMatch((cm->cm.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode())))){ |
|
|
|
return true; |
|
|
|
} |
|
|
|
@@ -313,7 +311,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
List<WxCouponMerchant> wxCouponMerchantList = wxCouponMerchantMapper.findList(wxCouponMerchant); |
|
|
|
List<Long> couponIds = wxCouponMerchantList.stream().map(cm -> cm.getProductId()).collect(Collectors.toList()); |
|
|
|
|
|
|
|
couponIds.stream().filter(cid -> !isCouponMerchantValid(cid)).forEach(cid -> { |
|
|
|
couponIds.stream().filter(cid -> !isCouponMerchantValid(cid,wxCouponMerchant.getTenantId())).forEach(cid -> { |
|
|
|
WxCoupon wxCoupon = new WxCoupon(); |
|
|
|
wxCoupon.setId(cid); |
|
|
|
wxCoupon.updateTenantInfo(wxMerchant); |
|
|
|
@@ -857,8 +855,8 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public List<WxMerchantVo> findMerchantVoList(Map paramMap) { |
|
|
|
return wxCouponMerchantMapper.findMerchantVoList(paramMap); |
|
|
|
public List<WxMerchantVo> findMerchantVoList(Long productId,String tenantId) { |
|
|
|
return wxCouponMerchantMapper.findMerchantVoList(productId,tenantId); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|