Merge branch 'rem_old_price_config'

This commit is contained in:
2025-09-09 09:47:45 +08:00
8 changed files with 4 additions and 281 deletions

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ycwl.basic.mapper.PriceConfigMapper">
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
insert into price_config (scenic_id, type, goods_ids, price, slash_price, create_time, update_time)
values (#{scenicId}, #{type}, #{goodsIds}, #{price}, #{slashPrice}, now(), now())
</insert>
<update id="update">
update price_config
<set>
<if test="scenicId != null">scenic_id = #{scenicId},</if>
<if test="type != null">type = #{type},</if>
<if test="goodsIds != null">goods_ids = #{goodsIds},</if>
<if test="price != null">price = #{price},</if>
<if test="slashPrice != null">slash_price = #{slashPrice},</if>
update_time = now()
</set>
where id = #{id}
</update>
<update id="updateStatus">
update price_config
set `status` = IF(`status` = 0, 1, 0),
update_time = now()
where id = #{id}
</update>
<delete id="deleteById">
delete from price_config where id = #{id}
</delete>
<select id="getById" resultType="com.ycwl.basic.model.pc.price.resp.PriceConfigRespVO">
select p.* from price_config p
where p.id = #{id}
</select>
<select id="listByCondition" resultType="com.ycwl.basic.model.pc.price.resp.PriceConfigRespVO">
select p.* from price_config p
<where>
<if test="req.scenicId != null">
and p.scenic_id = #{req.scenicId}
</if>
<if test="req.type != null">
and p.type = #{req.type}
</if>
<if test="req.goodsId != null">
and p.goods_ids like concat('%', #{req.goodsId}, '%')
</if>
<if test="req.status != null">
and p.status = #{req.status}
</if>
</where>
</select>
<select id="getPriceByScenicTypeGoods" resultType="com.ycwl.basic.model.pc.price.entity.PriceConfigEntity">
select * from price_config
where scenic_id = #{scenicId}
and type = #{type} and status = 1
<if test="goodsId != null and goodsId != ''">
and goods_ids like concat('%', #{goodsId}, '%')
</if>
</select>
</mapper>