Просмотр исходного кода

[需求][1000115]:增加场景发券显示券使用的商家

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
87bbf75c0a
2 измененных файлов: 22 добавлений и 1 удалений
  1. +13
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java
  2. +9
    -1
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml

+ 13
- 0
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;
}


+ 9
- 1
mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml Просмотреть файл

@@ -11,10 +11,18 @@
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
</resultMap>

<sql id="allColumns">
`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
</sql>

<sql id="dynamicWhereConditions">


Загрузка…
Отмена
Сохранить