|
|
|
@@ -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"> |
|
|
|
|