修改产品功能

This commit is contained in:
wuweihua
2026-09-28 21:43:39 +08:00
parent b247bc2fd2
commit 0ad90f6183
32 changed files with 339 additions and 660 deletions
@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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
left join product_country c on c.detail_id = d.product_country_id
<where>
<if test="priceSetId != null">
AND d.price_set_id = #{priceSetId}
@@ -161,21 +161,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.effective_date,
c.expire_date,
sysdate()
from bms_product_country c
inner join bms_product p on p.product_id = c.product_id
from product_country c
inner join product p on p.product_id = c.product_id
<where>
<choose>
<when test="baseVersionNo != null and baseVersionNo != ''">
and exists (
select 1 from bms_product_price_version v
where v.ppv_id = c.ppv_id
and v.version_no = #{baseVersionNo}
)
</when>
<otherwise>
and p.status = '1'
and p.product_id = (
select max(p2.product_id) from bms_product p2
select max(p2.product_id) from product p2
where p2.product_code = p.product_code and p2.status = '1'
)
and ifnull(c.status, '1') &lt;&gt; '2'
@@ -189,9 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and (c.expire_date is null or date(c.expire_date) &gt; date(#{asOf}))
</otherwise>
</choose>
</otherwise>
</choose>
</where>
</where>
order by p.product_code asc, c.country_name asc, c.zone_code asc, c.weight_min asc, c.detail_id asc
</insert>
@@ -206,26 +195,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
p.product_name,
'HALF_UP',
sysdate()
from bms_product p
from product p
<where>
<choose>
<when test="baseVersionNo != null and baseVersionNo != ''">
and exists (
select 1 from bms_product_country c
inner join bms_product_price_version v on v.ppv_id = c.ppv_id
where c.product_id = p.product_id
and v.version_no = #{baseVersionNo}
)
</when>
<otherwise>
and p.status = '1'
and p.product_id = (
select max(p2.product_id) from bms_product p2
select max(p2.product_id) from product p2
where p2.product_code = p.product_code and p2.status = '1'
)
</otherwise>
</choose>
</where>
</where>
order by p.product_code asc
</insert>