新增打单产品渠道查询与替换功能

This commit is contained in:
wuweihua
2026-11-11 14:50:34 +08:00
parent 41a80f9794
commit 7e1041391a
20 changed files with 603 additions and 109 deletions
@@ -13,6 +13,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
limit 1
</select>
<select id="selectByProductIdAndType" resultType="com.bms.price.domain.ChannelProductMap">
select m.id,
m.channel_id as channelId,
m.channel_code as channelCode,
m.product_id as productId,
c.channel_name as channelName,
m.pay_type as payType,
m.create_by as createBy,
m.create_time as createTime,
m.update_by as updateBy,
m.update_time as updateTime
from srv_channel_product_map m
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
</select>
<select id="selectByProductIdsAndType" resultType="com.bms.price.domain.ChannelProductMap">
select m.id,
m.channel_id as channelId,
m.channel_code as channelCode,
m.product_id as productId,
c.channel_name as channelName,
m.pay_type as payType,
m.create_by as createBy,
m.create_time as createTime,
m.update_by as updateBy,
m.update_time as updateTime
from srv_channel_product_map m
left join srv_service_channel c on c.id = m.channel_id
where m.pay_type = #{payType}
and m.product_id in
<foreach collection="productIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
order by m.product_id asc, m.channel_code asc, m.channel_id asc
</select>
<insert id="upsert">
insert into srv_channel_product_map (
@@ -42,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="weight" column="weight" />
<result property="bizDate" column="biz_date" />
<result property="tmsId" column="tms_id" />
<result property="matchSource" column="match_source" />
<result property="matchMessage" column="match_message" />
<result property="productFloorCode" column="product_floor_code" />
<result property="productFloor" column="product_floor" />
<result property="priceSetId" column="price_set_id" />
<result property="priceSetCode" column="price_set_code" />
<result property="priceSetName" column="price_set_name" />
@@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
pieces, actual_weight, receive_weight, volume, volume_weight, pkg_length, pkg_width, pkg_height,
shipper_name, consignee_name, dest_postcode, warehouse_code, order_time, order_remark,
product_code, product_name, country_code, country_name, weight, biz_date, tms_id,
match_source, match_message, price_set_id, price_set_code, price_set_name,
product_floor_code, product_floor, price_set_id, price_set_code, price_set_name,
set_type, bind_priority, customer_priceset_id, psv_id, psd_id,
weight_min, weight_max, weight_label, effective_date, charge_weight,
freight_rate, base_freight_rate, discount_percent, registration_fee,
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
p.pieces, p.actual_weight, p.receive_weight, p.volume, p.volume_weight, p.pkg_length, p.pkg_width, p.pkg_height,
p.shipper_name, p.consignee_name, p.dest_postcode, p.warehouse_code, p.order_time, p.order_status, p.bl_pickup, p.pickup_date, p.order_remark,
p.product_code, p.product_name, p.country_code, p.country_name, p.weight, p.biz_date, p.tms_id,
p.match_source, p.match_message, p.price_set_id, p.price_set_code, p.price_set_name,
p.product_floor_code, p.product_floor, p.price_set_id, p.price_set_code, p.price_set_name,
p.set_type, p.bind_priority, p.customer_priceset_id, p.psv_id, p.psd_id,
p.weight_min, p.weight_max, p.weight_label, p.effective_date, p.charge_weight,
p.freight_rate, p.base_freight_rate, p.discount_percent, p.registration_fee,
@@ -542,8 +542,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="countryCode != null and countryCode != ''">
AND p.country_code = #{countryCode}
</if>
<if test="matchSource != null and matchSource != ''">
AND p.match_source = #{matchSource}
<if test="productFloorCode != null and productFloorCode != ''">
AND p.product_floor_code like concat('%', #{productFloorCode}, '%')
</if>
<if test="bizDate != null">
AND p.biz_date = #{bizDate}
@@ -844,7 +844,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
pieces, actual_weight, receive_weight, volume, volume_weight, pkg_length, pkg_width, pkg_height,
shipper_name, consignee_name, dest_postcode, warehouse_code, order_time, order_status, bl_pickup, pickup_date, order_remark,
product_code, product_name, country_code, country_name, weight, biz_date, tms_id,
match_source, match_message, price_set_id, price_set_code, price_set_name,
product_floor_code, product_floor, price_set_id, price_set_code, price_set_name,
set_type, bind_priority, customer_priceset_id, psv_id, psd_id,
weight_min, weight_max, weight_label, effective_date, charge_weight,
freight_rate, base_freight_rate, discount_percent, registration_fee,
@@ -858,7 +858,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{pieces}, #{actualWeight}, #{receiveWeight}, #{volume}, #{volumeWeight}, #{pkgLength}, #{pkgWidth}, #{pkgHeight},
#{shipperName}, #{consigneeName}, #{destPostcode}, #{warehouseCode}, #{orderTime}, #{orderStatus}, #{blPickup}, #{pickupDate}, #{orderRemark},
#{productCode}, #{productName}, #{countryCode}, #{countryName}, #{weight}, #{bizDate}, #{tmsId},
#{matchSource}, #{matchMessage}, #{priceSetId}, #{priceSetCode}, #{priceSetName},
#{productFloorCode}, #{productFloor}, #{priceSetId}, #{priceSetCode}, #{priceSetName},
#{setType}, #{bindPriority}, #{customerPricesetId}, #{psvId}, #{psdId},
#{weightMin}, #{weightMax}, #{weightLabel}, #{effectiveDate}, #{chargeWeight},
#{freightRate}, #{baseFreightRate}, #{discountPercent}, #{registrationFee},
@@ -908,8 +908,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
weight = #{weight},
biz_date = #{bizDate},
tms_id = #{tmsId},
match_source = #{matchSource},
match_message = #{matchMessage},
product_floor_code = #{productFloorCode},
product_floor = #{productFloor},
price_set_id = #{priceSetId},
price_set_code = #{priceSetCode},
price_set_name = #{priceSetName},