新增路线产品
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>
|
||||
Reference in New Issue
Block a user