修改产品导入

This commit is contained in:
wuweihua
2026-09-29 20:50:01 +08:00
parent 3f8f3a824d
commit 38f371742a
10 changed files with 613 additions and 139 deletions
@@ -171,6 +171,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and (effective_date is null or effective_date < #{newEffectiveDate})
</update>
<update id="expireOpenByProductCodeAndCountry">
update product_country
set expire_date = #{newEffectiveDate},
update_time = sysdate()
where product_code = #{productCode}
and expire_date is null
and (effective_date is null or effective_date &lt; #{newEffectiveDate})
<choose>
<when test="countryCode != null and countryCode != ''">
and upper(ifnull(country_code,'')) = upper(#{countryCode})
</when>
<otherwise>
and country_name = #{countryName}
</otherwise>
</choose>
</update>
<update id="refreshStatusByDates">
update product_country
set status = case
@@ -190,6 +207,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</delete>
<delete id="deleteOpenByProductCodeAndCountryOnDate">
delete from product_country
where product_code = #{productCode}
and expire_date is null
and (
(#{effectiveDate} is null and effective_date is null)
or effective_date = #{effectiveDate}
)
<choose>
<when test="countryCode != null and countryCode != ''">
and upper(ifnull(country_code,'')) = upper(#{countryCode})
</when>
<otherwise>
and country_name = #{countryName}
</otherwise>
</choose>
</delete>
<select id="selectMatchByProductCountryWeight" resultMap="BmsProductCountryResult">
<include refid="selectVo"/>
where c.product_code = #{productCode}