| | |
| | | ,IFNULL(count(*),0) as useNum from coupon_number cn left join coupon c on cn.couponId = c.id |
| | | where cn.isDel = 0 and cn.sendShopId = #{shopId} |
| | | and c.type = 1 and cn.validState = 1 |
| | | and cn.sendReason = #{sendReason} and cn.commonType = 'marketing_assistant' |
| | | and cn.sendReason in ('ks','ccj') and cn.commonType = 'marketing_assistant' |
| | | <if test="startTime != null"> |
| | | and cn.createTime >= #{startTime} |
| | | </if> |
| | |
| | | ,IFNULL(count(*),0) as useNum from coupon_number cn left join coupon c on cn.couponId = c.id |
| | | where cn.isDel = 0 |
| | | and c.type = 1 and cn.validState = 1 |
| | | and cn.sendReason = #{sendReason} and cn.commonType = 'marketing_assistant' |
| | | and cn.sendReason in ('ks','ccj') and cn.commonType = 'marketing_assistant' |
| | | and ascrCostDeptName = #{ascrCostDeptName} |
| | | <if test="startTime != null"> |
| | | and cn.createTime >= #{startTime} |