增加软删除

This commit is contained in:
wuweihua
2026-10-12 09:52:24 +08:00
parent 5aba8af49d
commit d08485d738
25 changed files with 561 additions and 101 deletions
@@ -57,7 +57,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 product_country c on c.detail_id = d.product_country_id
left join product_country c on c.detail_id = d.product_country_id and ifnull(c.is_del, '0') = '0'
<where>
<if test="priceSetId != null">
AND d.price_set_id = #{priceSetId}
@@ -166,9 +166,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
inner join product p on p.product_id = c.product_id
<where>
and p.status = '1'
and ifnull(p.is_del, '0') = '0'
and ifnull(c.is_del, '0') = '0'
and p.product_id = (
select max(p2.product_id) from product p2
where p2.product_code = p.product_code and p2.status = '1'
and ifnull(p2.is_del, '0') = '0'
)
and ifnull(c.status, '1') &lt;&gt; '2'
<choose>
@@ -226,9 +229,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
inner join product p on p.product_id = c.product_id
<where>
and p.status = '1'
and ifnull(p.is_del, '0') = '0'
and ifnull(c.is_del, '0') = '0'
and p.product_id = (
select max(p2.product_id) from product p2
where p2.product_code = p.product_code and p2.status = '1'
and ifnull(p2.is_del, '0') = '0'
)
and ifnull(c.status, '1') &lt;&gt; '2'
<choose>
@@ -259,9 +265,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from product p
<where>
and p.status = '1'
and ifnull(p.is_del, '0') = '0'
and p.product_id = (
select max(p2.product_id) from product p2
where p2.product_code = p.product_code and p2.status = '1'
and ifnull(p2.is_del, '0') = '0'
)
</where>
order by p.product_code asc