|
|
|
@@ -14,11 +14,7 @@ import com.iformall.domain.dto.WxCouponMerchantDto; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.po.base.BaseEntity; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.domain.vo.WxCUserBasicInfoVo; |
|
|
|
import com.iformall.domain.vo.WxCouponCVo; |
|
|
|
import com.iformall.domain.vo.WxCouponChannelVo; |
|
|
|
import com.iformall.domain.vo.WxCouponStatisVo; |
|
|
|
import com.iformall.domain.vo.WxMerchantVo; |
|
|
|
import com.iformall.domain.vo.*; |
|
|
|
import com.iformall.domain.vo.excel.WxCardData; |
|
|
|
import com.iformall.domain.vo.excel.WxCouponData; |
|
|
|
import com.iformall.domain.vo.excel.WxPressData; |
|
|
|
@@ -967,5 +963,40 @@ public class WxCouponServiceImpl implements WxCouponService { |
|
|
|
return wxCoupon.validDate(isShare,true,new Date()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map<Long, String> getCouponMerchant(List<Long> couponIds, TenantEntity tenantEntity) { |
|
|
|
Map<Long,String> couponMerchantMap = new HashMap<Long,String>(); |
|
|
|
|
|
|
|
List<Long> merchantIds = wxCouponMerchantMapper.findMerchantByProductIds(tenantEntity.getTenantId(),couponIds); |
|
|
|
|
|
|
|
WxMerchant merchantQ = new WxMerchant(); |
|
|
|
merchantQ.updateTenantInfo(tenantEntity); |
|
|
|
merchantQ.setIds(merchantIds); |
|
|
|
List<WxMerchant> merchantList = wxMerchantMapper.findIdNameList(merchantQ); |
|
|
|
Map<Long,String> merchantNameMap = new HashMap<Long,String>(); |
|
|
|
if (null != merchantList) { |
|
|
|
for (int i = 0 ; i < merchantList.size() ; i ++) { |
|
|
|
WxMerchant m = merchantList.get(i); |
|
|
|
merchantNameMap.put(m.getId(), m.getName()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<WxMerchantProductVo> merchantProductVos = wxCouponMerchantMapper.findMerchantProduct(tenantEntity.getTenantId(), merchantIds); |
|
|
|
// Map<Long,String> couponMerchantMap = new HashMap<Long,String>(); |
|
|
|
if (null != merchantProductVos) { |
|
|
|
for (int i = 0 ; i < merchantProductVos.size(); i ++) { |
|
|
|
WxMerchantProductVo mp = merchantProductVos.get(i); |
|
|
|
if(couponIds.contains(mp.getProductId())){ |
|
|
|
if (mp.getMc() > 1) { |
|
|
|
couponMerchantMap.put(mp.getProductId(), "多商户通用"); |
|
|
|
}else { |
|
|
|
couponMerchantMap.put(mp.getProductId(), merchantNameMap.get(mp.getMerchantId())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return couponMerchantMap; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |