导入批量修改价格明细

This commit is contained in:
wuweihua
2026-09-28 18:01:26 +08:00
parent c278ed76f7
commit b247bc2fd2
19 changed files with 777 additions and 54 deletions
@@ -23,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="productCountryId" column="product_country_id" />
<result property="fvValue" column="fv_value" />
<result property="fvRegistrationFee" column="fv_registration_fee" />
<result property="baseFreightPrice" column="base_freight_price" />
<result property="baseRegistrationFee" column="base_registration_fee" />
<result property="discountValue" column="discount_value" />
<result property="roundMode" column="round_mode" />
<result property="prId" column="pr_id" />
@@ -46,54 +48,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectPrcPriceSetDetailList" parameterType="PrcPriceSetDetail" resultMap="PrcPriceSetDetailResult">
<include refid="selectPrcPriceSetDetailVo"/>
select d.psd_id, d.price_set_id, d.psv_id, d.product_code, d.product_name, d.country_code, d.country_name,
d.zone_id, d.zone_code, d.zone_name,
d.zd_id, d.wsd_id, d.weight_label, d.weight_min, d.weight_max, d.product_country_id,
d.fv_value, d.fv_registration_fee,
c.freight_price as base_freight_price,
c.registration_fee as base_registration_fee,
d.discount_value, d.round_mode, d.pr_id, d.effective_date, d.expire_date, d.create_time, d.update_time
from prc_price_set_detail d
left join bms_product_country c on c.detail_id = d.product_country_id
<where>
<if test="priceSetId != null">
AND price_set_id = #{priceSetId}
AND d.price_set_id = #{priceSetId}
</if>
<if test="psvId != null">
AND psv_id = #{psvId}
AND d.psv_id = #{psvId}
</if>
<if test="productCode != null and productCode != ''">
AND product_code = #{productCode}
AND d.product_code = #{productCode}
</if>
<if test="countryCode != null and countryCode != ''">
AND country_code = #{countryCode}
AND d.country_code = #{countryCode}
</if>
<if test="zoneCode != null and zoneCode != ''">
AND zone_code = #{zoneCode}
AND d.zone_code = #{zoneCode}
</if>
<if test="productKeyword != null and productKeyword != ''">
AND (
product_code like concat('%', #{productKeyword}, '%')
or product_name like concat('%', #{productKeyword}, '%')
d.product_code like concat('%', #{productKeyword}, '%')
or d.product_name like concat('%', #{productKeyword}, '%')
)
</if>
<if test="countryKeyword != null and countryKeyword != ''">
AND (
country_code like concat('%', #{countryKeyword}, '%')
or country_name like concat('%', #{countryKeyword}, '%')
d.country_code like concat('%', #{countryKeyword}, '%')
or d.country_name like concat('%', #{countryKeyword}, '%')
)
</if>
<if test="zoneKeyword != null and zoneKeyword != ''">
AND (
zone_code like concat('%', #{zoneKeyword}, '%')
or zone_name like concat('%', #{zoneKeyword}, '%')
d.zone_code like concat('%', #{zoneKeyword}, '%')
or d.zone_name like concat('%', #{zoneKeyword}, '%')
)
</if>
<if test="keyword != null and keyword != ''">
AND (
product_code like concat('%', #{keyword}, '%')
or product_name like concat('%', #{keyword}, '%')
or country_code like concat('%', #{keyword}, '%')
or country_name like concat('%', #{keyword}, '%')
or zone_code like concat('%', #{keyword}, '%')
or zone_name like concat('%', #{keyword}, '%')
or weight_label like concat('%', #{keyword}, '%')
d.product_code like concat('%', #{keyword}, '%')
or d.product_name like concat('%', #{keyword}, '%')
or d.country_code like concat('%', #{keyword}, '%')
or d.country_name like concat('%', #{keyword}, '%')
or d.zone_code like concat('%', #{keyword}, '%')
or d.zone_name like concat('%', #{keyword}, '%')
or d.weight_label like concat('%', #{keyword}, '%')
)
</if>
</where>
order by psd_id asc
order by d.psd_id asc
</select>
<select id="countProductByPriceSetId" parameterType="Long" resultType="int">
@@ -271,6 +281,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<update id="updateDetailPrices">
update prc_price_set_detail
set fv_value = #{fvValue},
fv_registration_fee = #{fvRegistrationFee},
update_time = sysdate()
where psd_id = #{psdId}
</update>
<update id="updatePrcPriceSetDetail" parameterType="PrcPriceSetDetail">
update prc_price_set_detail
<set>