增加可用优惠券数量
This commit is contained in:
@@ -30,7 +30,10 @@
|
||||
<select id="selectByOrderId" resultType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons">
|
||||
select * from tb_user_coupons where order_id = #{orderId}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<select id="selectByUserIdAndAmount" resultType="java.lang.Integer">
|
||||
select ifnull(count(*),0) from tb_user_coupons where user_id = #{userId} and status = '0' and coupons_amount >= #{orderNum}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_user_coupons
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
Reference in New Issue
Block a user