重构产品价和红线价功能

This commit is contained in:
wuweihua
2026-10-18 14:16:27 +08:00
parent db6f5e882a
commit 60d4614695
84 changed files with 6753 additions and 2843 deletions
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="PrcPriceExcelFile" id="PrcPriceExcelFileResult">
<id property="pefId" column="pef_id" />
<result property="excelType" column="excel_type" />
<result property="psvId" column="psv_id" />
<result property="effectiveTime" column="effective_time" />
<result property="fileName" column="file_name" />
<result property="filePath" column="file_path" />
@@ -23,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectPrcPriceExcelFileVo">
select pef_id, excel_type, effective_time, file_name, file_path, file_size, content_type,
select pef_id, excel_type, psv_id, effective_time, file_name, file_path, file_size, content_type,
file_extension, oss_id, sheet_names, remark, created_by, create_time, updated_by, update_time
from prc_price_excel_file
</sql>
@@ -39,6 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="excelType != null and excelType != ''">
AND excel_type = #{excelType}
</if>
<if test="psvId != null">
AND psv_id = #{psvId}
</if>
<if test="fileName != null and fileName != ''">
AND file_name like concat('%', #{fileName}, '%')
</if>
@@ -46,20 +50,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by pef_id desc
</select>
<select id="selectByProductCode" resultMap="PrcPriceExcelFileResult">
select distinct f.pef_id, f.excel_type, f.effective_time, f.file_name, f.file_path, f.file_size,
f.content_type, f.file_extension, f.oss_id, f.sheet_names, f.remark,
f.created_by, f.create_time, f.updated_by, f.update_time
from prc_price_excel_file f
inner join product p on p.pef_id = f.pef_id and ifnull(p.is_del, '0') = '0'
where p.product_code = #{productCode}
and p.pef_id is not null
order by f.effective_time desc, f.pef_id desc
<select id="selectByPsvId" resultMap="PrcPriceExcelFileResult">
<include refid="selectPrcPriceExcelFileVo"/>
where psv_id = #{psvId}
order by effective_time desc, pef_id desc
</select>
<insert id="insertPrcPriceExcelFile" parameterType="PrcPriceExcelFile" useGeneratedKeys="true" keyProperty="pefId">
insert into prc_price_excel_file (
<if test="excelType != null and excelType != ''">excel_type,</if>
<if test="psvId != null">psv_id,</if>
<if test="effectiveTime != null">effective_time,</if>
<if test="fileName != null and fileName != ''">file_name,</if>
<if test="filePath != null and filePath != ''">file_path,</if>
@@ -73,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
create_time
) values (
<if test="excelType != null and excelType != ''">#{excelType},</if>
<if test="psvId != null">#{psvId},</if>
<if test="effectiveTime != null">#{effectiveTime},</if>
<if test="fileName != null and fileName != ''">#{fileName},</if>
<if test="filePath != null and filePath != ''">#{filePath},</if>
@@ -91,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update prc_price_excel_file
<set>
<if test="excelType != null and excelType != ''">excel_type = #{excelType},</if>
<if test="psvId != null">psv_id = #{psvId},</if>
<if test="effectiveTime != null">effective_time = #{effectiveTime},</if>
<if test="fileName != null and fileName != ''">file_name = #{fileName},</if>
<if test="filePath != null and filePath != ''">file_path = #{filePath},</if>
@@ -113,27 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<select id="selectByRedlineProductCode" resultMap="PrcPriceExcelFileResult">
select distinct f.pef_id, f.excel_type, f.effective_time, f.file_name, f.file_path, f.file_size,
f.content_type, f.file_extension, f.oss_id, f.sheet_names, f.remark,
f.created_by, f.create_time, f.updated_by, f.update_time
from prc_price_excel_file f
inner join redline_product p on p.pef_id = f.pef_id and ifnull(p.is_del, '0') = '0'
where p.product_code = #{productCode}
and p.pef_id is not null
order by f.effective_time desc, f.pef_id desc
</select>
<select id="selectByPsvId" resultMap="PrcPriceExcelFileResult">
select distinct f.pef_id, f.excel_type, f.effective_time, f.file_name, f.file_path, f.file_size,
f.content_type, f.file_extension, f.oss_id, f.sheet_names, f.remark,
f.created_by, f.create_time, f.updated_by, f.update_time
from prc_price_excel_file f
inner join prc_price_set_product psp on psp.pef_id = f.pef_id
where psp.psv_id = #{psvId}
and psp.pef_id is not null
order by f.effective_time desc, f.pef_id desc
</select>
<delete id="physicalDeleteByPsvId">
delete from prc_price_excel_file where psv_id = #{psvId}
</delete>
</mapper>