修改测算逻辑

This commit is contained in:
wuweihua
2026-09-18 17:09:43 +08:00
parent e08a36de91
commit bb240746a6
22 changed files with 435 additions and 44 deletions
@@ -93,6 +93,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<!-- 仅服务于明细编辑弹窗:前端每次提交全量可编辑字段,
重量上限/失效日期允许写 null(= 不封顶 / 长期),故不用 <if> 守卫 -->
<update id="updateBmsProductCountry" parameterType="BmsProductCountry">
update bms_product_country
set weight_min = #{weightMin},
weight_max = #{weightMax},
freight_price = #{freightPrice},
registration_fee = #{registrationFee},
size_limit = #{sizeLimit},
last_mile = #{lastMile},
lead_time = #{leadTime},
effective_date = #{effectiveDate},
expire_date = #{expireDate},
update_time = sysdate()
where detail_id = #{detailId}
</update>
<delete id="deleteByProductId" parameterType="Long">
delete from bms_product_country where product_id = #{productId}
</delete>
@@ -108,6 +108,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(1) from prc_price_set_detail where psv_id = #{psvId}
</select>
<select id="selectDetailOptionRows" resultMap="PrcPriceSetDetailResult">
select distinct product_code, product_name, country_code, country_name, zone_code, zone_name
from prc_price_set_detail
where psv_id = #{psvId}
order by product_code, country_name, zone_code
</select>
<!-- FIXED: join active products + country by product_id only (avoid OR-join row explosion) -->
<insert id="insertFixedDetailsFromLibrary">
insert ignore into prc_price_set_detail (