修改优化

This commit is contained in:
wuweihua
2026-10-18 15:32:48 +08:00
parent 60d4614695
commit a19d97d111
5 changed files with 46 additions and 0 deletions
@@ -581,6 +581,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</update>
<update id="syncEffectByPriceSetId">
update prc_price_set_detail d
inner join prc_price_set_version v on v.psv_id = d.psv_id
set d.effective_date = v.effective_time,
d.expire_date = v.expire_time,
d.status = v.status,
d.update_time = sysdate()
where v.price_set_id = #{priceSetId}
and v.price_type = 'SALES'
and d.price_type = 'SALES'
and (
not (d.status &lt;=&gt; v.status)
or not (d.effective_date &lt;=&gt; v.effective_time)
or not (d.expire_date &lt;=&gt; v.expire_time)
)
</update>
<update id="updatePriceTypeByPsvId">
update prc_price_set_detail
set price_type = #{priceType}, update_time = sysdate()
@@ -222,4 +222,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</update>
<update id="syncEffectByPriceSetId">
update prc_price_set_product p
inner join prc_price_set_version v on v.psv_id = p.psv_id
set p.effective_time = v.effective_time,
p.expire_time = v.expire_time,
p.status = v.status,
p.update_time = sysdate()
where v.price_set_id = #{priceSetId}
and v.price_type = 'SALES'
and p.price_type = 'SALES'
and (
not (p.status &lt;=&gt; v.status)
or not (p.effective_time &lt;=&gt; v.effective_time)
or not (p.expire_time &lt;=&gt; v.expire_time)
)
</update>
</mapper>