重构产品价和红线价功能

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
@@ -39,8 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ifnull(c.country_name, rc.country_name) as country_name, ifnull(c.weight_min, rc.weight_min) as weight_min, ifnull(c.weight_max, rc.weight_max) as weight_max
from prc_surcharge_rel r
join prc_surcharge s on s.sc_id = r.sc_id and ifnull(s.is_del, '0') = '0'
left join product_country c on c.detail_id = r.detail_id and r.price_type = 'PRODUCT' and ifnull(c.is_del, '0') = '0'
left join redline_product_country rc on rc.detail_id = r.detail_id and r.price_type = 'REDLINE' and ifnull(rc.is_del, '0') = '0'
left join prc_price_set_detail c on c.psd_id = r.detail_id and r.price_type = 'PRODUCT' and ifnull(c.is_del, '0') = '0'
left join prc_price_set_detail rc on rc.psd_id = r.detail_id and r.price_type = 'REDLINE' and ifnull(rc.is_del, '0') = '0'
</sql>
<select id="selectPrcSurchargeRelList" parameterType="PrcSurchargeRel" resultMap="PrcSurchargeRelResult">
@@ -136,6 +136,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</update>
<delete id="physicalDeleteByPsvId">
delete r from prc_surcharge_rel r
where exists (
select 1 from prc_price_set_product p
where p.psp_id = r.product_id and p.psv_id = #{psvId}
)
or exists (
select 1 from prc_price_set_detail d
where d.psd_id = r.detail_id and d.psv_id = #{psvId}
)
</delete>
<!-- 附加费版本化编辑后,产品关联重指向新记录 -->
<update id="rebindRelScId">
update prc_surcharge_rel