统一修改ruoyi->bms

This commit is contained in:
caojia
2026-09-28 10:02:38 +08:00
parent 341afc4111
commit 0408b6c35e
639 changed files with 2776 additions and 2807 deletions
@@ -0,0 +1,113 @@
<?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.bms.price.mapper.PrcPriceSetVersionMapper">
<resultMap type="PrcPriceSetVersion" id="PrcPriceSetVersionResult">
<id property="psvId" column="psv_id" />
<result property="priceSetId" column="price_set_id" />
<result property="versionNo" column="version_no" />
<result property="versionSeq" column="version_seq" />
<result property="effectiveTime" column="effective_time" />
<result property="expireTime" column="expire_time" />
<result property="status" column="status" />
<result property="createBy" column="created_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="updated_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectPrcPriceSetVersionVo">
select psv_id, price_set_id, version_no, version_seq, effective_time, expire_time, status,
created_by, create_time, updated_by, update_time
from prc_price_set_version
</sql>
<select id="selectPrcPriceSetVersionById" parameterType="Long" resultMap="PrcPriceSetVersionResult">
<include refid="selectPrcPriceSetVersionVo"/>
where psv_id = #{psvId}
</select>
<select id="selectPrcPriceSetVersionList" parameterType="PrcPriceSetVersion" resultMap="PrcPriceSetVersionResult">
<include refid="selectPrcPriceSetVersionVo"/>
<where>
<if test="priceSetId != null">
AND price_set_id = #{priceSetId}
</if>
<if test="versionNo != null and versionNo != ''">
AND version_no = #{versionNo}
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
</where>
order by version_seq desc
</select>
<select id="selectMaxVersionSeq" resultType="java.lang.Integer">
select max(version_seq) from prc_price_set_version where price_set_id = #{priceSetId}
</select>
<insert id="insertPrcPriceSetVersion" parameterType="PrcPriceSetVersion" useGeneratedKeys="true" keyProperty="psvId">
insert into prc_price_set_version (
<if test="priceSetId != null">price_set_id,</if>
<if test="versionNo != null and versionNo != ''">version_no,</if>
<if test="versionSeq != null">version_seq,</if>
<if test="effectiveTime != null">effective_time,</if>
<if test="expireTime != null">expire_time,</if>
<if test="status != null and status != ''">status,</if>
<if test="createBy != null and createBy != ''">created_by,</if>
create_time
) values (
<if test="priceSetId != null">#{priceSetId},</if>
<if test="versionNo != null and versionNo != ''">#{versionNo},</if>
<if test="versionSeq != null">#{versionSeq},</if>
<if test="effectiveTime != null">#{effectiveTime},</if>
<if test="expireTime != null">#{expireTime},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<update id="updatePrcPriceSetVersion" parameterType="PrcPriceSetVersion">
update prc_price_set_version
<set>
<if test="versionNo != null and versionNo != ''">version_no = #{versionNo},</if>
<if test="versionSeq != null">version_seq = #{versionSeq},</if>
<if test="effectiveTime != null">effective_time = #{effectiveTime},</if>
expire_time = #{expireTime},
<if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">updated_by = #{updateBy},</if>
update_time = sysdate()
</set>
where psv_id = #{psvId}
</update>
<delete id="deletePrcPriceSetVersionByIds" parameterType="Long">
delete from prc_price_set_version where psv_id in
<foreach item="psvId" collection="array" open="(" separator="," close=")">
#{psvId}
</foreach>
</delete>
<delete id="deletePrcPriceSetVersionByPriceSetId" parameterType="Long">
delete from prc_price_set_version where price_set_id = #{priceSetId}
</delete>
<select id="selectPriceSetIds" resultType="Long">
select distinct price_set_id from prc_price_set_version
</select>
<select id="selectActiveByPriceSetAt" resultMap="PrcPriceSetVersionResult">
<include refid="selectPrcPriceSetVersionVo"/>
where price_set_id = #{priceSetId}
and effective_time is not null
and effective_time &lt;= #{asOf}
and (expire_time is null or expire_time &gt; #{asOf})
order by effective_time desc, version_seq desc, psv_id desc
limit 1
</select>
</mapper>