渠道管理增加应收关联

This commit is contained in:
wuweihua
2026-11-09 17:27:21 +08:00
parent ace1eb06c0
commit 2632e5aa78
10 changed files with 131 additions and 28 deletions
@@ -5,8 +5,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.bms.price.mapper.ChannelProductMapMapper">
<select id="selectByChannelAndType" resultType="com.bms.price.domain.ChannelProductMap">
select id, channel_id as channelId, product_id as productId, price_set_id as priceSetId,
pay_type as payType, create_by as createBy, create_time as createTime,
select id, channel_id as channelId, channel_code as channelCode, product_id as productId,
price_set_id as priceSetId, pay_type as payType, create_by as createBy, create_time as createTime,
update_by as updateBy, update_time as updateTime
from srv_channel_product_map
where channel_id = #{channelId} and pay_type = #{payType}
@@ -15,11 +15,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="upsert">
insert into srv_channel_product_map (
channel_id, product_id, price_set_id, pay_type, create_by, create_time, update_by, update_time
channel_id, channel_code, product_id, price_set_id, pay_type, create_by, create_time, update_by, update_time
) values (
#{channelId}, #{productId}, #{priceSetId}, #{payType}, #{createBy}, sysdate(), #{updateBy}, sysdate()
#{channelId}, #{channelCode}, #{productId}, #{priceSetId}, #{payType}, #{createBy}, sysdate(), #{updateBy}, sysdate()
)
on duplicate key update
channel_code = values(channel_code),
product_id = values(product_id),
price_set_id = values(price_set_id),
update_by = values(update_by),
@@ -212,7 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTemplateOptions" resultMap="PayProductResult">
select p.product_id, p.product_name, p.dict_value, p.sheet_name, p.supplier_name, p.effective_date,
select p.product_id, p.product_name, p.product_type, p.dict_value, p.sheet_name, p.supplier_name, p.effective_date,
p.currency, ifnull(cur.version_no, p.version_no) as version_no
from pay_product p
left join pay_product_term t on t.term_id = (
@@ -227,6 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join pay_product cur on cur.product_id = t.product_id
where (p.channel_id is null or p.channel_id = '')
and p.origin_id is null
and ifnull(p.product_type, 'AP') = #{payType}
order by p.product_name
</select>