| | |
| | | #{item} |
| | | </foreach> |
| | | </update> |
| | | <update id="expireHomeActivityCouponTemplate"> |
| | | update t_coupon_template set status='expired' where category='activity' and get_type='home' and status='active' |
| | | </update> |
| | | |
| | | <select id="getCouponTemplatePage" resultType="com.mzl.flower.dto.response.coupon.CouponTemplateVO"> |
| | | <include refid="QuerySql2"/> |
| | |
| | | SELECT * |
| | | FROM t_coupon_template t |
| | | WHERE t.deleted = FALSE |
| | | AND t.get_start_date <= NOW() |
| | | AND NOW() <= t.get_end_date |
| | | <if test="param.category != null and param.category != '' and param.category == 'activity' "> |
| | | AND t.get_start_date <= NOW() |
| | | AND NOW() <= t.get_end_date |
| | | </if> |
| | | |
| | | <if test="param.category != null and param.category != ''"> |
| | | AND category = #{param.category} |
| | | </if> |
| | |
| | | <select id="getCouponTemplateVipPage" resultType="com.mzl.flower.dto.response.coupon.CouponTemplateVO"> |
| | | <include refid="QuerySqlVip" /> |
| | | </select> |
| | | <select id="getHomeActivityEffectAlert" resultType="com.mzl.flower.dto.response.coupon.CouponTemplateVO"> |
| | | SELECT * |
| | | FROM t_coupon_template t |
| | | WHERE t.deleted = FALSE |
| | | |
| | | <if test="param.category != null and param.category != '' and param.category == 'activity' "> |
| | | AND t.get_start_date <= NOW() |
| | | AND NOW() <= t.get_end_date |
| | | </if> |
| | | |
| | | <if test="param.category != null and param.category != ''"> |
| | | AND t.category = #{param.category} |
| | | </if> |
| | | <if test="param.status != null and param.status != ''"> |
| | | AND t.status = #{param.status} |
| | | </if> |
| | | <if test="param.getType != null and param.getType != ''"> |
| | | AND t.get_type = #{param.getType} |
| | | </if> |
| | | ORDER BY t.create_time DESC |
| | | limit 1 |
| | | </select> |
| | | |
| | | <sql id="QueryPointSql"> |
| | | select * |