| @@ -361,6 +361,9 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| private boolean isCouponMerchantValid(Long couponId,TenantEntity tenantEntity) { | private boolean isCouponMerchantValid(Long couponId,TenantEntity tenantEntity) { | ||||
| List<WxMerchantVo> merchantVoList = findMerchantListByProduct(tenantEntity,couponId,false); | List<WxMerchantVo> merchantVoList = findMerchantListByProduct(tenantEntity,couponId,false); | ||||
| if(merchantVoList == null){ | |||||
| return false; | |||||
| } | |||||
| if (merchantVoList.stream().anyMatch((cm->cm.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode())))){ | if (merchantVoList.stream().anyMatch((cm->cm.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode())))){ | ||||
| return true; | return true; | ||||
| } | } | ||||
| @@ -1594,27 +1597,25 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| List<WxMerchantVo> retList = new ArrayList<WxMerchantVo>(); | List<WxMerchantVo> retList = new ArrayList<WxMerchantVo>(); | ||||
| for (int i = 0 ; i < couponMerchantList.size() ; i++) { | for (int i = 0 ; i < couponMerchantList.size() ; i++) { | ||||
| WxCouponMerchant cm = couponMerchantList.get(i); | WxCouponMerchant cm = couponMerchantList.get(i); | ||||
| if (null != cm) { | |||||
| WxMerchantVo vo = new WxMerchantVo(); | |||||
| vo.setParameter(cm.getParameter()); | |||||
| if (null != cm.getMerchantId()) { | |||||
| WxMerchant m = merchantMap.get(cm.getMerchantId()); | |||||
| if (null != m) { | |||||
| vo.setId(m.getId()); | |||||
| vo.setMerchantImgUrl(m.getImgUrl()); | |||||
| vo.setMerchantName(m.getName()); | |||||
| vo.setMerchantLinkPhone(m.getLinkPhone()); | |||||
| vo.setMerchantStatus(m.getStatus()); | |||||
| vo.setBusinessId(m.getBusinessId()); | |||||
| vo.setSubBusinessId(m.getSubBusinessId()); | |||||
| vo.setLinkLinePhone(m.getLinkLinePhone()); | |||||
| vo.setMerchantStatus(m.getStatus()); | |||||
| if (null != merchantShopVoMap) { | |||||
| vo.setShopVoList(merchantShopVoMap.get(m.getId())); | |||||
| } | |||||
| } | |||||
| } | |||||
| retList.add(vo); | |||||
| if (null != cm && null != cm.getMerchantId()) { | |||||
| WxMerchant m = merchantMap.get(cm.getMerchantId()); | |||||
| if (null != m) { | |||||
| WxMerchantVo vo = new WxMerchantVo(); | |||||
| vo.setParameter(cm.getParameter()); | |||||
| vo.setId(m.getId()); | |||||
| vo.setMerchantImgUrl(m.getImgUrl()); | |||||
| vo.setMerchantName(m.getName()); | |||||
| vo.setMerchantLinkPhone(m.getLinkPhone()); | |||||
| vo.setMerchantStatus(m.getStatus()); | |||||
| vo.setBusinessId(m.getBusinessId()); | |||||
| vo.setSubBusinessId(m.getSubBusinessId()); | |||||
| vo.setLinkLinePhone(m.getLinkLinePhone()); | |||||
| if (null != merchantShopVoMap) { | |||||
| vo.setShopVoList(merchantShopVoMap.get(m.getId())); | |||||
| } | |||||
| retList.add(vo); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| if (retList.size() <=0 ) { | if (retList.size() <=0 ) { | ||||