|
|
|
@@ -1522,16 +1522,23 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
return findCouponMerchantVoList(couponIds, mallTenantEntity, null, hasShop); |
|
|
|
} |
|
|
|
|
|
|
|
private Map<Long,List<WxMerchantVo>> findCouponMerchantVoList(List<Long> couponIds,TenantEntity mallTenantEntity,TtMerchantPoi poiQ,boolean hasShop) { |
|
|
|
private Map<Long,List<WxMerchantVo>> findCouponMerchantVoList(List<Long> couponIds,TenantEntity mallTenantEntity,List<Long> poiMerchantIds,boolean hasShop) { |
|
|
|
Map<Long,List<WxMerchantVo>> retMap = new HashMap<Long,List<WxMerchantVo>>(); |
|
|
|
if (null == couponIds || couponIds.size() <= 0) { |
|
|
|
return retMap; |
|
|
|
} |
|
|
|
List<Long> merchantIds = wxCouponMerchantMapper.findMerchantByProductIds(mallTenantEntity.getTenantId(), couponIds); |
|
|
|
if(null != merchantIds && merchantIds.size() > 0 ) { |
|
|
|
if (null == poiQ) { |
|
|
|
poiQ = new TtMerchantPoi(); |
|
|
|
List<Long> productMerchantIds = wxCouponMerchantMapper.findMerchantByProductIds(mallTenantEntity.getTenantId(), couponIds); |
|
|
|
if(null != productMerchantIds && productMerchantIds.size() > 0 ) { |
|
|
|
List<Long> merchantIds = null; |
|
|
|
if (null != poiMerchantIds && poiMerchantIds.size() > 0 ){ |
|
|
|
//取交集 |
|
|
|
merchantIds = (List<Long>) CollectionUtils.intersection(poiMerchantIds, productMerchantIds); |
|
|
|
} |
|
|
|
if (null == merchantIds) { |
|
|
|
return retMap; |
|
|
|
} |
|
|
|
|
|
|
|
TtMerchantPoi poiQ = new TtMerchantPoi(); |
|
|
|
poiQ.updateTenantInfo(mallTenantEntity); |
|
|
|
poiQ.setIds(merchantIds); |
|
|
|
List<TtMerchantPoi> poiList = ttMerchantPoiMapper.findList(poiQ); |
|
|
|
|