新增路线产品
This commit is contained in:
@@ -0,0 +1,184 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bms.masterdata.mapper.LineProductMapper">
|
||||
|
||||
<resultMap id="LineProductResult" type="com.bms.masterdata.domain.LineProduct">
|
||||
<result property="id" column="id"/>
|
||||
<result property="lineCode" column="line_code"/>
|
||||
<result property="lineName" column="line_name"/>
|
||||
<result property="productType" column="product_type"/>
|
||||
<result property="lineType" column="line_type"/>
|
||||
<result property="blCargo" column="bl_cargo"/>
|
||||
<result property="cargoName" column="cargo_name"/>
|
||||
<result property="productStorage" column="product_storage"/>
|
||||
<result property="productFirst" column="product_first"/>
|
||||
<result property="productClearance" column="product_clearance"/>
|
||||
<result property="productStorageCode" column="product_storage_code"/>
|
||||
<result property="productFirstCode" column="product_first_code"/>
|
||||
<result property="productClearanceCode" column="product_clearance_code"/>
|
||||
<result property="blOpen" column="bl_open"/>
|
||||
<result property="blSection" column="bl_section"/>
|
||||
<result property="dispCode" column="disp_code"/>
|
||||
<result property="dispName" column="disp_name"/>
|
||||
<result property="feeClass" column="fee_class"/>
|
||||
<result property="shipperId" column="shipper_id"/>
|
||||
<result property="shipmentRule" column="shipment_rule"/>
|
||||
<result property="weight" column="weight"/>
|
||||
<result property="cargoType" column="cargo_type"/>
|
||||
<result property="productCategory" column="product_category"/>
|
||||
<result property="volumeBasis" column="volume_basis"/>
|
||||
<result property="weightType" column="weight_type"/>
|
||||
<result property="serviceType" column="service_type"/>
|
||||
<result property="shipmentType" column="shipment_type"/>
|
||||
<result property="taxAmount" column="tax_amount"/>
|
||||
<result property="taxCurrency" column="tax_currency"/>
|
||||
<result property="batteryType" column="battery_type"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createName" column="create_name"/>
|
||||
<result property="createManCode" column="create_man_code"/>
|
||||
<result property="createDate" column="create_date"/>
|
||||
<result property="modifier" column="modifier"/>
|
||||
<result property="modifierCode" column="modifier_code"/>
|
||||
<result property="modifyDate" column="modify_date"/>
|
||||
<result property="gmtCreate" column="gmt_create"/>
|
||||
<result property="gmtModified" column="gmt_modified"/>
|
||||
<result property="syncTime" column="sync_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectLineProductVo">
|
||||
select id, line_code, line_name, product_type, line_type, bl_cargo, cargo_name,
|
||||
product_storage, product_first, product_clearance,
|
||||
product_storage_code, product_first_code, product_clearance_code,
|
||||
bl_open, bl_section, disp_code, disp_name, fee_class, shipper_id, shipment_rule,
|
||||
weight, cargo_type, product_category, volume_basis, weight_type, service_type, shipment_type,
|
||||
tax_amount, tax_currency, battery_type, remark,
|
||||
create_name, create_man_code, create_date, modifier, modifier_code, modify_date,
|
||||
gmt_create, gmt_modified, sync_time
|
||||
from srv_line_product
|
||||
</sql>
|
||||
|
||||
<select id="selectLineProductList" parameterType="com.bms.masterdata.domain.LineProduct" resultMap="LineProductResult">
|
||||
<include refid="selectLineProductVo"/>
|
||||
<where>
|
||||
<if test="lineCode != null and lineCode != ''">
|
||||
AND line_code like concat('%', #{lineCode}, '%')
|
||||
</if>
|
||||
<if test="lineName != null and lineName != ''">
|
||||
AND line_name like concat('%', #{lineName}, '%')
|
||||
</if>
|
||||
<if test="productType != null and productType != ''">
|
||||
AND product_type like concat('%', #{productType}, '%')
|
||||
</if>
|
||||
<if test="lineType != null and lineType != ''">
|
||||
AND line_type like concat('%', #{lineType}, '%')
|
||||
</if>
|
||||
<if test="blOpen != null and blOpen != ''">
|
||||
AND bl_open = #{blOpen}
|
||||
</if>
|
||||
<if test="blCargo != null and blCargo != ''">
|
||||
AND bl_cargo = #{blCargo}
|
||||
</if>
|
||||
<if test="dispName != null and dispName != ''">
|
||||
AND disp_name like concat('%', #{dispName}, '%')
|
||||
</if>
|
||||
<if test="cargoType != null and cargoType != ''">
|
||||
AND cargo_type like concat('%', #{cargoType}, '%')
|
||||
</if>
|
||||
<if test="productCategory != null and productCategory != ''">
|
||||
AND product_category like concat('%', #{productCategory}, '%')
|
||||
</if>
|
||||
</where>
|
||||
order by line_code
|
||||
</select>
|
||||
|
||||
<select id="selectLineProductById" parameterType="String" resultMap="LineProductResult">
|
||||
<include refid="selectLineProductVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectLineProductByCode" parameterType="String" resultMap="LineProductResult">
|
||||
<include refid="selectLineProductVo"/>
|
||||
where line_code = #{lineCode}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="countProductChannelByProductId" parameterType="String" resultType="int">
|
||||
select count(1) from srv_product_channel where product_id = #{productId}
|
||||
</select>
|
||||
|
||||
<insert id="insertLineProduct" parameterType="com.bms.masterdata.domain.LineProduct">
|
||||
insert into srv_line_product (
|
||||
id, line_code, line_name, product_type, line_type, bl_cargo, cargo_name,
|
||||
product_storage, product_first, product_clearance,
|
||||
product_storage_code, product_first_code, product_clearance_code,
|
||||
bl_open, bl_section, disp_code, disp_name, fee_class, shipper_id, shipment_rule,
|
||||
weight, cargo_type, product_category, volume_basis, weight_type, service_type, shipment_type,
|
||||
tax_amount, tax_currency, battery_type, remark,
|
||||
create_name, create_date, modifier, modify_date, gmt_create, gmt_modified
|
||||
) values (
|
||||
#{id}, #{lineCode}, #{lineName}, #{productType}, #{lineType}, #{blCargo}, #{cargoName},
|
||||
#{productStorage}, #{productFirst}, #{productClearance},
|
||||
#{productStorageCode}, #{productFirstCode}, #{productClearanceCode},
|
||||
#{blOpen}, #{blSection}, #{dispCode}, #{dispName}, #{feeClass}, #{shipperId}, #{shipmentRule},
|
||||
#{weight}, #{cargoType}, #{productCategory}, #{volumeBasis}, #{weightType}, #{serviceType}, #{shipmentType},
|
||||
#{taxAmount}, #{taxCurrency}, #{batteryType}, #{remark},
|
||||
#{createName}, sysdate(), #{modifier}, sysdate(), sysdate(), sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateLineProduct" parameterType="com.bms.masterdata.domain.LineProduct">
|
||||
update srv_line_product
|
||||
set line_code = #{lineCode},
|
||||
line_name = #{lineName},
|
||||
product_type = #{productType},
|
||||
line_type = #{lineType},
|
||||
bl_cargo = #{blCargo},
|
||||
cargo_name = #{cargoName},
|
||||
product_storage = #{productStorage},
|
||||
product_first = #{productFirst},
|
||||
product_clearance = #{productClearance},
|
||||
product_storage_code = #{productStorageCode},
|
||||
product_first_code = #{productFirstCode},
|
||||
product_clearance_code = #{productClearanceCode},
|
||||
bl_open = #{blOpen},
|
||||
bl_section = #{blSection},
|
||||
disp_code = #{dispCode},
|
||||
disp_name = #{dispName},
|
||||
fee_class = #{feeClass},
|
||||
shipper_id = #{shipperId},
|
||||
shipment_rule = #{shipmentRule},
|
||||
weight = #{weight},
|
||||
cargo_type = #{cargoType},
|
||||
product_category = #{productCategory},
|
||||
volume_basis = #{volumeBasis},
|
||||
weight_type = #{weightType},
|
||||
service_type = #{serviceType},
|
||||
shipment_type = #{shipmentType},
|
||||
tax_amount = #{taxAmount},
|
||||
tax_currency = #{taxCurrency},
|
||||
battery_type = #{batteryType},
|
||||
remark = #{remark},
|
||||
modifier = #{modifier},
|
||||
modify_date = sysdate(),
|
||||
gmt_modified = sysdate()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateLineProductStatus" parameterType="com.bms.masterdata.domain.LineProduct">
|
||||
update srv_line_product
|
||||
set bl_open = #{blOpen},
|
||||
modifier = #{modifier},
|
||||
modify_date = sysdate(),
|
||||
gmt_modified = sysdate()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteLineProductByIds" parameterType="String">
|
||||
delete from srv_line_product where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bms.price.mapper.PayProductFeeRuleMapper">
|
||||
|
||||
<select id="selectByProductId" resultType="com.bms.price.domain.PayProductFeeRule">
|
||||
select rule_id as ruleId, product_id as productId, fee_name as feeName, enabled,
|
||||
trigger_type as triggerType, side_max_cm as sideMaxCm, sum_max_cm as sumMaxCm,
|
||||
volume_max_cm3 as volumeMaxCm3, min_length_cm as minLengthCm, min_width_cm as minWidthCm,
|
||||
min_height_cm as minHeightCm, weight_max_kg as weightMaxKg, join_mode as joinMode,
|
||||
remark, created_by as createBy, create_time as createTime, updated_by as updateBy,
|
||||
update_time as updateTime
|
||||
from pay_product_fee_rule
|
||||
where product_id = #{productId}
|
||||
order by rule_id
|
||||
</select>
|
||||
|
||||
<delete id="deleteByProductId">
|
||||
delete from pay_product_fee_rule where product_id = #{productId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByProductIds">
|
||||
delete from pay_product_fee_rule where product_id in
|
||||
<foreach collection="productIds" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into pay_product_fee_rule (
|
||||
product_id, fee_name, enabled, trigger_type, side_max_cm, sum_max_cm, volume_max_cm3,
|
||||
min_length_cm, min_width_cm, min_height_cm, weight_max_kg, join_mode, remark,
|
||||
created_by, create_time, updated_by, update_time
|
||||
) values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.productId}, #{item.feeName}, #{item.enabled}, #{item.triggerType},
|
||||
#{item.sideMaxCm}, #{item.sumMaxCm}, #{item.volumeMaxCm3},
|
||||
#{item.minLengthCm}, #{item.minWidthCm}, #{item.minHeightCm}, #{item.weightMaxKg},
|
||||
#{item.joinMode}, #{item.remark}, #{item.createBy}, #{item.createTime},
|
||||
#{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user