1. 优惠券逻辑删除
This commit is contained in:
parent
af994ca491
commit
86f241cb50
|
@ -47,22 +47,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM
|
||||
et_coupon c
|
||||
left join et_operating_area a on a.area_id = c.area_id
|
||||
<where>
|
||||
<if test="name != null "> and c.name like concat('%', #{name}, '%')</if>
|
||||
<if test="type != null and type != ''"> and c.type = #{type}</if>
|
||||
<if test="discountPercent != null "> and c.discount_percent = #{discountPercent}</if>
|
||||
<if test="areaId != null "> and c.area_id = #{areaId}</if>
|
||||
<if test="areaName != null "> and a.area_name like concat('%', #{areaName}, '%')</if>
|
||||
<if test="discountAmount != null "> and c.discount_amount = #{discountAmount}</if>
|
||||
<if test="status != null and status != ''"> and c.status = #{status}</if>
|
||||
<if test="limitNum != null and limitNum != ''"> and c.limit_num = #{limitNum}</if>
|
||||
<if test="typeList != null">
|
||||
AND c.type IN
|
||||
<foreach item="item" index="index" collection="typeList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
where del_flag != 2
|
||||
<if test="name != null "> and c.name like concat('%', #{name}, '%')</if>
|
||||
<if test="type != null and type != ''"> and c.type = #{type}</if>
|
||||
<if test="discountPercent != null "> and c.discount_percent = #{discountPercent}</if>
|
||||
<if test="areaId != null "> and c.area_id = #{areaId}</if>
|
||||
<if test="areaName != null "> and a.area_name like concat('%', #{areaName}, '%')</if>
|
||||
<if test="discountAmount != null "> and c.discount_amount = #{discountAmount}</if>
|
||||
<if test="status != null and status != ''"> and c.status = #{status}</if>
|
||||
<if test="limitNum != null and limitNum != ''"> and c.limit_num = #{limitNum}</if>
|
||||
<if test="typeList != null">
|
||||
AND c.type IN
|
||||
<foreach item="item" index="index" collection="typeList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectEtCouponByCouponId" parameterType="Long" resultMap="EtCouponResult">
|
||||
|
@ -132,7 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<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=")">
|
||||
#{couponId}
|
||||
</foreach>
|
||||
|
|
Loading…
Reference in New Issue
Block a user