From 87bbf75c0a9bb30739ab781e74401ba30ec65b12 Mon Sep 17 00:00:00 2001 From: hupeng Date: Mon, 14 Jan 2019 11:14:25 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=9C=80=E6=B1=82][1000115]:=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=9C=BA=E6=99=AF=E5=8F=91=E5=88=B8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=88=B8=E4=BD=BF=E7=94=A8=E7=9A=84=E5=95=86=E5=AE=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/domain/po/WxCouponSend.java | 13 +++++++++++++ .../main/resources/mapper/WxCouponSendMapper.xml | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java b/mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java index cb044d5b3..9c019a050 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java @@ -68,6 +68,10 @@ public class WxCouponSend implements Serializable { @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") private Date updateDate; + /*发卷所属商户名**/ + @Transient + private String merchantName; + /*场景发券计数**/ @Transient protected int sendCount; @@ -126,6 +130,15 @@ public class WxCouponSend implements Serializable { updateDate = _updateDate; } + + public String getMerchantName() { + return merchantName; + } + + public void setMerchantName(String merchantName) { + this.merchantName = merchantName; + } + public int getSendCount() { return sendCount; } diff --git a/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml index 6efc8ee86..294c67925 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml @@ -11,10 +11,18 @@ + - `id`,`tenant_id`,`coupon_id`,`title`,`send_type`,`conditions`,`status`,`create_date`,`update_date` + `id`,`tenant_id`,`coupon_id`,`title`,`send_type`,`conditions`,`status`,`create_date`,`update_date`, + (case when + (select count(*) from wx_coupon_merchant xcm where xcm.product_id = coupon_id and status = 0)=1 + then + (select m.name from wx_merchant m, wx_coupon_merchant cm where m.id = cm.merchant_id and cm.product_id=coupon_id) + else + '[多商户通用]' + end) as merchant_name