diff --git a/mallinkService/src/main/java/com/iformall/service/WxMerchantService.java b/mallinkService/src/main/java/com/iformall/service/WxMerchantService.java index dcbfb9d23..d7f24e0f1 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxMerchantService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxMerchantService.java @@ -204,7 +204,7 @@ public interface WxMerchantService { List getFloorBuildMerchantIds(TenantEntity tenantEntity,String floorRule,Long building,Long floor,String shopTypeForRule,Integer merchantShopDel,Integer shopDel ,String shopNumber) ; - List findMerchantListByProduct(TenantEntity tenantEntity,Long productId,boolean hasShop); + List findMerchantListByProduct(TenantEntity tenantEntity,Long productId,boolean hasShop,boolean isValid); WxMerchantCorp getMerchantCorp(TenantEntity tenantInfo, Long id); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java index ad5a2b5f4..1f561c37e 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java @@ -802,7 +802,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { cvo.setQrCode(cc.getQrCode()); cvo.setTtQrCode(cc.getTtQrCode()); if (hasMerchant) { - cvo.setMerchantVoList(wxMerchantService.findMerchantListByProduct(cc,cc.getCouponId(), true)); + cvo.setMerchantVoList(wxMerchantService.findMerchantListByProduct(cc,cc.getCouponId(), true,false)); } return cvo; } catch (IllegalAccessException e) { diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java index 8c74dadc1..a3bfd24ad 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java @@ -2593,7 +2593,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { WxCardCVo cardCVo = findCardDetailOfCUser(Long.valueOf(couponOrderId),tenantinfo.getTenantId()); - cardCVo.setMerchantVoList(wxMerchantService.findMerchantListByProduct(tenantinfo,cardCVo.getCouponId(), false)); + cardCVo.setMerchantVoList(wxMerchantService.findMerchantListByProduct(tenantinfo,cardCVo.getCouponId(), false, true)); Long couponId = cardCVo.getCouponId(); WxCouponChannel wxCouponChannel = new WxCouponChannel(); 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 4958398c1..cd6b13743 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java @@ -2059,7 +2059,7 @@ public class WxCouponServiceImpl implements WxCouponService { TenantEntity mallTenantEntity = new TenantEntity(); mallTenantEntity.setTenantId(wcm.getMallTenantId()); mallTenantEntity.setParentTenantId(couponTenantEntity.getTenantId()); - List merchantVoList = wxMerchantService.findMerchantListByProduct(mallTenantEntity,couponId,false); + List merchantVoList = wxMerchantService.findMerchantListByProduct(mallTenantEntity,couponId,false,false); if (null != merchantVoList && merchantVoList.size() > 0 ) { if (merchantVoList.stream().anyMatch((cm->cm.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode())))){ return true; @@ -2069,7 +2069,7 @@ public class WxCouponServiceImpl implements WxCouponService { return false; }else { - List merchantVoList = wxMerchantService.findMerchantListByProduct(couponTenantEntity,couponId,false); + List merchantVoList = wxMerchantService.findMerchantListByProduct(couponTenantEntity,couponId,false,false); if (null == merchantVoList || merchantVoList.size() <=0 ) { return false; } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java index a9aa79c63..2e1d3b6c4 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java @@ -465,7 +465,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { private boolean isCouponMerchantValid(Long couponId,TenantEntity tenantEntity) { - List merchantVoList = findMerchantListByProduct(tenantEntity,couponId,false); + List merchantVoList = findMerchantListByProduct(tenantEntity,couponId,false,false); if(merchantVoList == null){ return false; } @@ -1990,7 +1990,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { } @Override - public List findMerchantListByProduct(TenantEntity tenantEntity,Long productId,boolean hasShop) { + public List findMerchantListByProduct(TenantEntity tenantEntity,Long productId,boolean hasShop,boolean isValid) { List merchantIds = wxCouponMerchantMapper.findMerchantIdListByProduct(productId, tenantEntity.getTenantId()); Map merchantMap = new HashMap(); Map> merchantShopVoMap = null; @@ -2043,7 +2043,12 @@ public class WxMerchantServiceImpl implements WxMerchantService { WxCouponMerchant cm = couponMerchantList.get(i); if (null != cm && null != cm.getMerchantId()) { WxMerchant m = merchantMap.get(cm.getMerchantId()); - if (null != m) { + if (null != m ) { + if (isValid) { + if (m.getIsDel() == EnumYesOrNo.YES.getCode() || m.getStatus() == EnumMerchantStatus.NOT_VALID.getCode()) { + continue; + } + } WxMerchantVo vo = new WxMerchantVo(); vo.setParameter(cm.getParameter()); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index 7d9df7b6e..8fb02c3ec 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -2674,7 +2674,7 @@ public class WxOrderServiceImpl implements WxOrderService { vo.initByCoupon(c,false); } if (hasMerchant) { - vo.setMerchantVoList(wxMerchantService.findMerchantListByProduct(tenantEntity, o.getProductId(), false)); + vo.setMerchantVoList(wxMerchantService.findMerchantListByProduct(tenantEntity, o.getProductId(), false,false)); } } retList.add(vo); @@ -2758,7 +2758,7 @@ public class WxOrderServiceImpl implements WxOrderService { WxCouponOrder couponOrder = wxCouponOrderMapper.findDetailOfCUser(couponOrderList.get(0).getId(), tenantEntity.getTenantId()); vo.initByCouponOrder(couponOrder); } - vo.setMerchantVoList(wxMerchantService.findMerchantListByProduct(tenantEntity, order.getProductId(), false)); + vo.setMerchantVoList(wxMerchantService.findMerchantListByProduct(tenantEntity, order.getProductId(), false,false)); voList.add(vo); } return voList;