增加可用优惠券数量

This commit is contained in:
wangguocheng
2024-05-23 09:27:18 +08:00
parent 75b451cdda
commit 7c5e40cd38
6 changed files with 30 additions and 1 deletions

View File

@@ -24,6 +24,9 @@
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons">
select * from tb_system_coupons where status = '0' and name = #{type}
</select>
<select id="selectByAmount" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
select ifnull(count(*),0) from tb_system_coupons where status = '0' and coupons_amount >= #{orderNum}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_system_coupons
where id = #{id,jdbcType=INTEGER}