| | |
| | | where 1 = 1 and distributionMethod = 4 |
| | | and auditStatus = 2 |
| | | and startTime < now() |
| | | and state= 1 |
| | | <if test="cityCode != null"> |
| | | and id in( |
| | | SELECT DISTINCT couponId FROM |
| | |
| | | WHERE storeId = #{storeId} |
| | | UNION ALL |
| | | SELECT DISTINCT couponId |
| | | |
| | | from t_coupon_city |
| | | WHERE provinceCode = #{cityCode}) o) |
| | | WHERE cityCode = #{cityCode}) o) |
| | | </if> |
| | | <if test="name != null"> |
| | | and `name` like concat('%', #{name}, '%') |
| | |
| | | <if test="state != null"> |
| | | and `state` = #{state} |
| | | </if> |
| | | |
| | | |
| | | union all |
| | | SELECT id, |
| | | `name`, |
| | |
| | | from t_coupon |
| | | where 1 = 1 and distributionMethod = 4 and useScope = 1 |
| | | and auditStatus = 2 |
| | | and state= 1 |
| | | and startTime < now() |
| | | <if test="name != null"> |
| | | and `name` like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | | </if> |
| | | |
| | | <if test="userPopulation != null"> |
| | | and userPopulation = #{userPopulation} |
| | | </if> |
| | | <if test="status !=null"> |
| | | and `status` = #{status} |
| | | </if> |
| | | <if test="state != null"> |
| | | and `state` = #{state} |
| | | </if> |
| | | |
| | | </select> |
| | | <select id="queryCouponExamineList" resultType="java.util.Map"> |