| | |
| | | <result column="order_no" property="orderNo" /> |
| | | |
| | | </resultMap> |
| | | <update id="checkCouponExpired"> |
| | | update t_coupon_record set `status`='expired' where `status`='unused' and effective_end < NOW() |
| | | <if test="param.userId != null and param.userId != ''"> |
| | | AND t.user_id = #{param.userId} |
| | | </if> |
| | | <if test="param.customerId != null and param.customerId != ''"> |
| | | AND t.customer_id = #{param.customerId} |
| | | </if> |
| | | </update> |
| | | |
| | | <select id="statisCouponTemplateCount" resultType="java.lang.Integer"> |
| | | select IFNULL(count(1),0) as cnt from t_coupon_record where deleted=false and category=#{param.category} |