1. 优惠券逻辑删除

This commit is contained in:
邱贞招 2024-09-04 22:11:16 +08:00
parent af994ca491
commit 86f241cb50

View File

@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM FROM
et_coupon c et_coupon c
left join et_operating_area a on a.area_id = c.area_id left join et_operating_area a on a.area_id = c.area_id
<where> where del_flag != 2
<if test="name != null "> and c.name like concat('%', #{name}, '%')</if> <if test="name != null "> and c.name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''"> and c.type = #{type}</if> <if test="type != null and type != ''"> and c.type = #{type}</if>
<if test="discountPercent != null "> and c.discount_percent = #{discountPercent}</if> <if test="discountPercent != null "> and c.discount_percent = #{discountPercent}</if>
@ -62,7 +62,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item} #{item}
</foreach> </foreach>
</if> </if>
</where>
</select> </select>
<select id="selectEtCouponByCouponId" parameterType="Long" resultMap="EtCouponResult"> <select id="selectEtCouponByCouponId" parameterType="Long" resultMap="EtCouponResult">
@ -132,7 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteEtCouponByCouponIds" parameterType="String"> <delete id="deleteEtCouponByCouponIds" parameterType="String">
delete from et_coupon where coupon_id in UPDATE et_coupon
SET del_flag = 2
WHERE coupon_id IN
<foreach item="couponId" collection="array" open="(" separator="," close=")"> <foreach item="couponId" collection="array" open="(" separator="," close=")">
#{couponId} #{couponId}
</foreach> </foreach>