| @@ -134,10 +134,15 @@ public class WxCouponOrderBVo extends WxCouponOrder { | |||||
| private String bUserName; | private String bUserName; | ||||
| @io.swagger.annotations.ApiModelProperty(value="b端用户手机号",name="bUserPhone") | @io.swagger.annotations.ApiModelProperty(value="b端用户手机号",name="bUserPhone") | ||||
| private String bUserPhone; | private String bUserPhone; | ||||
| @Excel(name = "发券商户", width = 50, orderNum = "3") | |||||
| @Excel(name = "券所属商户", width = 50, orderNum = "3") | |||||
| @io.swagger.annotations.ApiModelProperty(value="使用券商户名",name="merchantName") | @io.swagger.annotations.ApiModelProperty(value="使用券商户名",name="merchantName") | ||||
| private String merchantName; | private String merchantName; | ||||
| @Excel(name = "发券商户(商户注券)", width = 50, orderNum = "3") | |||||
| @io.swagger.annotations.ApiModelProperty(value="发券商户(商户注券)",name="sendMerchantName") | |||||
| @TableField(exist = false) | |||||
| private String sendMerchantName; | |||||
| // public String getMerchantName() { | // public String getMerchantName() { | ||||
| // if(this.getCmCount() != null && this.getCmCount() > 1){ | // if(this.getCmCount() != null && this.getCmCount() > 1){ | ||||
| // this.merchantName = "[多商户通用]"; | // this.merchantName = "[多商户通用]"; | ||||
| @@ -332,11 +332,24 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| @Override | @Override | ||||
| public void exportData(WxCouponOrderBVo wxCouponOrder, HttpServletRequest request, HttpServletResponse response) { | public void exportData(WxCouponOrderBVo wxCouponOrder, HttpServletRequest request, HttpServletResponse response) { | ||||
| String filename = "券订单"; | String filename = "券订单"; | ||||
| WxMerchant merchantQ = new WxMerchant(); | |||||
| merchantQ.updateTenantInfo(wxCouponOrder); | |||||
| List<WxMerchant> merchantList = wxMerchantMapper.findIdNameList(merchantQ); | |||||
| Map<Long,String> merchantNameMap = new HashMap<Long,String>(); | |||||
| if (null != merchantList) { | |||||
| merchantList.parallelStream().forEach(m -> { | |||||
| merchantNameMap.put(m.getId(), m.getName()); | |||||
| }); | |||||
| } | |||||
| List<WxCouponOrderBVo> list = wxCouponOrderMapper.findListOfAdmin(wxCouponOrder); | List<WxCouponOrderBVo> list = wxCouponOrderMapper.findListOfAdmin(wxCouponOrder); | ||||
| list.parallelStream().forEach(c -> { | list.parallelStream().forEach(c -> { | ||||
| if (c.getCouponOrderStatus().equals(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode())) { | if (c.getCouponOrderStatus().equals(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode())) { | ||||
| c.setUpdateDate(null); | c.setUpdateDate(null); | ||||
| } | } | ||||
| if (null != c.getSendMerchantId()) { | |||||
| c.setSendMerchantName(merchantNameMap.get(c.getSendMerchantId())); | |||||
| } | |||||
| // if (!c.getMerchantId().equals(0L)) { | // if (!c.getMerchantId().equals(0L)) { | ||||
| // List<WxMerchantVo> merchantVoList = c.getMerchantVoList(); | // List<WxMerchantVo> merchantVoList = c.getMerchantVoList(); | ||||
| // if (!CollectionUtils.isEmpty(merchantVoList)) { | // if (!CollectionUtils.isEmpty(merchantVoList)) { | ||||
| @@ -764,6 +764,8 @@ | |||||
| <result column="merchant_name" jdbcType="VARCHAR" property="merchantName" /> | <result column="merchant_name" jdbcType="VARCHAR" property="merchantName" /> | ||||
| <result column="verify_merchant_name" jdbcType="VARCHAR" property="verifyMerchantName"/> | <result column="verify_merchant_name" jdbcType="VARCHAR" property="verifyMerchantName"/> | ||||
| <result column="send_merchant_id" jdbcType="INTEGER" property="sendMerchantId" /> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allAdminCouponOrderListColumns"> | <sql id="allAdminCouponOrderListColumns"> | ||||
| @@ -786,7 +788,7 @@ | |||||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.order_id, | co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.order_id, | ||||
| co.create_date,co.update_date,co.coupon_price, co.verify_type, co.pay_vendor,c.title,c.sale_price,c.use_price,c.price, | co.create_date,co.update_date,co.coupon_price, co.verify_type, co.pay_vendor,c.title,c.sale_price,c.use_price,c.price, | ||||
| c.unit,c.auto_refund,c.business,c.subsidy_type,c.source_type,ms.subsidy subsidy_num, | |||||
| co.send_merchant_id,c.unit,c.auto_refund,c.business,c.subsidy_type,c.source_type,ms.subsidy subsidy_num, | |||||
| (CASE WHEN couc.mc = 1 THEN m1.name ELSE '[多商户通用]' END) AS merchant_name, | (CASE WHEN couc.mc = 1 THEN m1.name ELSE '[多商户通用]' END) AS merchant_name, | ||||
| (CASE WHEN couc.mc = 1 THEN m1.id ELSE 0 END) AS merchant_id, | (CASE WHEN couc.mc = 1 THEN m1.id ELSE 0 END) AS merchant_id, | ||||
| cu.phone,m2.name AS verify_merchant_name,cal.channel_type | cu.phone,m2.name AS verify_merchant_name,cal.channel_type | ||||