优化附加费计算规则,调整相关逻辑和注释

This commit is contained in:
wuweihua
2026-11-13 15:25:10 +08:00
parent 880b4751c5
commit 87eab12d51
8 changed files with 89 additions and 41 deletions
@@ -16,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectByProductIdAndType" resultType="com.bms.price.domain.ChannelProductMap">
select m.id,
m.channel_id as channelId,
m.channel_code as channelCode,
coalesce(nullif(m.channel_code, ''), c.channel_code) as channelCode,
m.product_id as productId,
c.channel_name as channelName,
m.pay_type as payType,
@@ -28,13 +28,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join srv_service_channel c on c.id = m.channel_id
where m.product_id = #{productId}
and m.pay_type = #{payType}
order by m.channel_code asc, m.channel_id asc
order by coalesce(nullif(m.channel_code, ''), c.channel_code) asc, m.channel_id asc
</select>
<select id="selectByProductIdsAndType" resultType="com.bms.price.domain.ChannelProductMap">
select m.id,
m.channel_id as channelId,
m.channel_code as channelCode,
coalesce(nullif(m.channel_code, ''), c.channel_code) as channelCode,
m.product_id as productId,
c.channel_name as channelName,
m.pay_type as payType,
@@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<foreach collection="productIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
order by m.product_id asc, m.channel_code asc, m.channel_id asc
order by m.product_id asc, coalesce(nullif(m.channel_code, ''), c.channel_code) asc, m.channel_id asc
</select>
<insert id="upsert">
@@ -61,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
on duplicate key update
channel_code = values(channel_code),
product_id = values(product_id),
create_by = ifnull(create_by, values(create_by)),
update_by = values(update_by),
update_time = sysdate()
</insert>