Revert "更新价格计算逻辑,添加套餐价格匹配和计费相关的国际化消息,优化数据库查询和删除操作"

This reverts commit 4f5959a2f9.
This commit is contained in:
luojiaquan
2026-09-30 10:17:56 +08:00
parent 4d8cb7c69c
commit ca37337386
9 changed files with 184 additions and 416 deletions
@@ -328,52 +328,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and psv_id = #{psvId}
</if>
and product_code = #{productCode}
<choose>
<when test="countryCode != null and countryCode != ''">
and upper(ifnull(country_code,'')) = upper(#{countryCode})
</when>
<when test="countryName != null and countryName != ''">
and country_name = #{countryName}
</when>
<otherwise>
and 1 = 0
</otherwise>
</choose>
<choose>
<when test="zoneCode != null and zoneCode != ''">
and upper(ifnull(zone_code,'')) = upper(#{zoneCode})
</when>
<otherwise>
and (zone_code is null or zone_code = '')
</otherwise>
</choose>
and weight_min &lt;= #{weight}
and weight_max &gt;= #{weight}
and (
<if test="productCountryId != null">
product_country_id = #{productCountryId}
or
</if>
(
<choose>
<when test="countryCode != null and countryCode != ''">
upper(ifnull(country_code,'')) = upper(#{countryCode})
</when>
<when test="countryName != null and countryName != ''">
country_name = #{countryName}
</when>
<otherwise>
1 = 0
</otherwise>
</choose>
<if test="zoneCode != null and zoneCode != ''">
and (zone_code is null or upper(zone_code) = upper(#{zoneCode}))
</if>
<if test="weightLabel != null and weightLabel != ''">
and (weight_label is null or weight_label = #{weightLabel} or weight_label like concat('%', #{weightLabel}, '%'))
</if>
)
)
order by
weight_min asc,
case when #{productCountryId} is not null and product_country_id = #{productCountryId} then 0 else 1 end,
case when #{zoneCode} is not null and upper(ifnull(zone_code,'')) = upper(#{zoneCode}) then 0 else 1 end,
case when zone_code is null then 1 else 0 end,
psd_id asc
limit 1
</select>
<select id="countZonedByPsvProductCountry" resultType="int">
select count(1)
from prc_price_set_detail
where psv_id = #{psvId}
and product_code = #{productCode}
and zone_code is not null and zone_code &lt;&gt; ''
<choose>
<when test="countryCode != null and countryCode != ''">
and upper(ifnull(country_code,'')) = upper(#{countryCode})
</when>
<when test="countryName != null and countryName != ''">
and country_name = #{countryName}
</when>
<otherwise>
and 1 = 0
</otherwise>
</choose>
</select>
<select id="selectDiscountMatch" resultMap="PrcPriceSetDetailResult">
<include refid="selectPrcPriceSetDetailVo"/>
where price_set_id = #{priceSetId}
@@ -134,10 +134,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<delete id="deletePrcQuoteById" parameterType="String">
delete from prc_quote where quote_id = #{quoteId}
</delete>
<update id="updateQuoteAmounts">
update prc_quote
set surcharge_amount = #{surchargeAmount},