|
|
|
@@ -865,7 +865,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
if (null != merchantIdList && merchantIdList.size() > 0 ) { |
|
|
|
WxMerchant merchantQ = new WxMerchant(); |
|
|
|
merchantQ.updateTenantInfo(tenantEntity); |
|
|
|
merchantQ.setIds(merchantIdList);; |
|
|
|
// merchantQ.setIds(merchantIdList); |
|
|
|
List<WxMerchant> merchantList = wxMerchantMapper.findIdNameList(merchantQ); |
|
|
|
if (null != merchantList) { |
|
|
|
for (int i = 0 ; i < merchantList.size() ; i ++) { |
|
|
|
@@ -876,6 +876,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
} |
|
|
|
|
|
|
|
Map<Long,WxCoupon> couponMap = new HashMap<Long,WxCoupon>(); |
|
|
|
Map<Long,Long> merchantProductIdMap = new HashMap<Long,Long>(); |
|
|
|
if (null != couponIdList && couponIdList.size() > 0 ) { |
|
|
|
WxCoupon couponQ = new WxCoupon(); |
|
|
|
couponQ.updateTenantInfo(tenantEntity); |
|
|
|
@@ -887,22 +888,34 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
couponMap.put(c.getId(), c); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<WxMerchantProductVo> merchantProductVos = wxCouponMerchantMapper.findMerchantProduct(tenantEntity.getTenantId(), couponIdList); |
|
|
|
if (null != merchantProductVos) { |
|
|
|
for (int i = 0 ; i < merchantProductVos.size(); i ++) { |
|
|
|
WxMerchantProductVo mp = merchantProductVos.get(i); |
|
|
|
if (mp.getMc() > 1) { |
|
|
|
merchantProductIdMap.put(mp.getProductId(), -999L); |
|
|
|
}else { |
|
|
|
merchantProductIdMap.put(mp.getProductId(), mp.getMerchantId()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Map<Long,Long> merchantProductIdMap = new HashMap<Long,Long>(); |
|
|
|
if (null != merchantIdList && merchantIdList.size() > 0 ) { |
|
|
|
List<WxMerchantProductVo> merchantProductVos = wxCouponMerchantMapper.findMerchantProduct(tenantEntity.getTenantId(), merchantIdList); |
|
|
|
if (null != merchantProductVos) { |
|
|
|
for (int i = 0 ; i < merchantProductVos.size(); i ++) { |
|
|
|
WxMerchantProductVo mp = merchantProductVos.get(i); |
|
|
|
if (mp.getMc() > 1) { |
|
|
|
merchantProductIdMap.put(mp.getProductId(), -999L); |
|
|
|
}else { |
|
|
|
merchantProductIdMap.put(mp.getProductId(), mp.getMerchantId()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// Map<Long,Long> merchantProductIdMap = new HashMap<Long,Long>(); |
|
|
|
// if (null != merchantIdList && merchantIdList.size() > 0 ) { |
|
|
|
// List<WxMerchantProductVo> merchantProductVos = wxCouponMerchantMapper.findMerchantProduct(tenantEntity.getTenantId(), couponIdList); |
|
|
|
// if (null != merchantProductVos) { |
|
|
|
// for (int i = 0 ; i < merchantProductVos.size(); i ++) { |
|
|
|
// WxMerchantProductVo mp = merchantProductVos.get(i); |
|
|
|
// if (mp.getMc() > 1) { |
|
|
|
// merchantProductIdMap.put(mp.getProductId(), -999L); |
|
|
|
// }else { |
|
|
|
// merchantProductIdMap.put(mp.getProductId(), mp.getMerchantId()); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
Map<Long,WxCUserBasicInfo> cUserMap = new HashMap<Long,WxCUserBasicInfo>(); |
|
|
|
@@ -948,17 +961,22 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
} |
|
|
|
|
|
|
|
co.setSubsidyNum(co.getSubsidy()); |
|
|
|
|
|
|
|
Long merchanId = merchantProductIdMap.get(co.getCouponId()); |
|
|
|
if (null != merchanId) { |
|
|
|
if (merchanId == -999L) { |
|
|
|
co.setMerchantName("多商户通用"); |
|
|
|
co.setMerchantId(0L); |
|
|
|
}else { |
|
|
|
co.setMerchantName(merchantNameMap.get(merchanId)); |
|
|
|
co.setMerchantId(merchanId); |
|
|
|
} |
|
|
|
|
|
|
|
if(co.getMerchantId() == null){ |
|
|
|
Long merchanId = merchantProductIdMap.get(co.getCouponId()); |
|
|
|
if (null != merchanId) { |
|
|
|
if (merchanId == -999L) { |
|
|
|
co.setMerchantName("多商户通用"); |
|
|
|
co.setMerchantId(0L); |
|
|
|
}else { |
|
|
|
co.setMerchantName(merchantNameMap.get(merchanId)); |
|
|
|
co.setMerchantId(merchanId); |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
co.setMerchantName(merchantNameMap.get(co.getMerchantId())); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WxCUserBasicInfo basicInfo = cUserMap.get(co.getCUserId()); |
|
|
|
if (null != basicInfo) { |
|
|
|
|