修改优化
This commit is contained in:
@@ -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 <=> v.status)
|
||||
or not (d.effective_date <=> v.effective_time)
|
||||
or not (d.expire_date <=> 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 <=> v.status)
|
||||
or not (p.effective_time <=> v.effective_time)
|
||||
or not (p.expire_time <=> v.expire_time)
|
||||
)
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user