|
|
|
@@ -3,7 +3,9 @@ package com.iformall.service.impl; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.aliyun.openservices.shade.com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
@@ -50,6 +52,8 @@ import java.math.BigDecimal; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@Service |
|
|
|
public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
@@ -955,7 +959,11 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
} |
|
|
|
|
|
|
|
private List<WxCouponOrderBVo> handleQueryResult(boolean cUserEntry,List<WxCouponOrder> list,TenantEntity couponOrderTenantEntity) { |
|
|
|
if (null != list && list.size() > 0) { |
|
|
|
// 获取该租户下所有的商户 |
|
|
|
List<WxMerchant> merchants = wxMerchantMapper.selectList(new LambdaQueryWrapper<WxMerchant>().select(WxMerchant::getId, WxMerchant::getName).eq(WxMerchant::getTenantId, couponOrderTenantEntity.getFinalTenantId())); |
|
|
|
Map<Long, String> merchantMap = merchants.stream().collect(Collectors.toMap(WxMerchant::getId, WxMerchant::getName)); |
|
|
|
|
|
|
|
if (null != list && list.size() > 0) { |
|
|
|
|
|
|
|
//循环list,获取 cUserId |
|
|
|
List<Long> cUserIdList = new ArrayList<Long>(); |
|
|
|
@@ -1073,7 +1081,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<Long,String> merchantNameMap = new HashMap<Long,String>(); |
|
|
|
if (null != mallMerchantIdList && mallMerchantIdList.size() > 0 ) { |
|
|
|
for (Iterator<String> it = mallMerchantIdList.keySet().iterator();it.hasNext();) { |
|
|
|
@@ -1122,7 +1130,8 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
co.setUpdateDate(null); |
|
|
|
} |
|
|
|
if (null != co.getSendMerchantId()) { |
|
|
|
co.setSendMerchantName(merchantNameMap.get(co.getSendMerchantId())); |
|
|
|
// co.setSendMerchantName(merchantNameMap.get(co.getSendMerchantId())); |
|
|
|
co.setSendMerchantName(merchantMap.get(co.getSendMerchantId())); |
|
|
|
} |
|
|
|
WxCoupon coupon = couponMap.get(co.getCouponId()); |
|
|
|
if (null != coupon) { |
|
|
|
|