新增渠道管理
This commit is contained in:
@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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="selectChannelVo">
|
||||
@@ -55,15 +56,104 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND channel_name like concat('%', #{channelName}, '%')
|
||||
</if>
|
||||
<if test="serviceCode != null and serviceCode != ''">
|
||||
AND service_code = #{serviceCode}
|
||||
AND service_code like concat('%', #{serviceCode}, '%')
|
||||
</if>
|
||||
<if test="serviceName != null and serviceName != ''">
|
||||
AND service_name like concat('%', #{serviceName}, '%')
|
||||
</if>
|
||||
<if test="desPort != null and desPort != ''">
|
||||
AND des_port like concat('%', #{desPort}, '%')
|
||||
</if>
|
||||
<if test="shipperName != null and shipperName != ''">
|
||||
AND shipper_name like concat('%', #{shipperName}, '%')
|
||||
</if>
|
||||
<if test="blOpen != null and blOpen != ''">
|
||||
AND bl_open = #{blOpen}
|
||||
</if>
|
||||
</where>
|
||||
order by service_code, channel_code
|
||||
</select>
|
||||
|
||||
<select id="selectServiceChannelById" parameterType="String" resultMap="ServiceChannelResult">
|
||||
<include refid="selectChannelVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectServiceChannelByCode" parameterType="String" resultMap="ServiceChannelResult">
|
||||
<include refid="selectChannelVo"/>
|
||||
where channel_code = #{channelCode}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="countProductChannelByCode" parameterType="String" resultType="int">
|
||||
select count(1) from srv_product_channel where channel_code = #{channelCode}
|
||||
</select>
|
||||
|
||||
<select id="countSupplierByChannelCode" parameterType="String" resultType="int">
|
||||
select count(1) from sup_supplier
|
||||
where del_flag = '0'
|
||||
and channel_ids is not null
|
||||
and channel_ids != ''
|
||||
and find_in_set(#{channelCode}, replace(channel_ids, ' ', ''))
|
||||
</select>
|
||||
|
||||
<insert id="insertServiceChannel" parameterType="com.bms.masterdata.domain.ServiceChannel">
|
||||
insert into srv_service_channel (
|
||||
id, channel_code, channel_name, service_code, service_name,
|
||||
bl_open, bl_multiple, cargo_type, pay_type, shipper_name, shipper_id,
|
||||
query_type, trajectory_code, final_service_name, des_port,
|
||||
weight_type, dim_divisor, weight_rule, shipment_type, data_from, remarks,
|
||||
create_name, create_date, modifier, modify_date, gmt_create, gmt_modified
|
||||
) values (
|
||||
#{id}, #{channelCode}, #{channelName}, #{serviceCode}, #{serviceName},
|
||||
#{blOpen}, #{blMultiple}, #{cargoType}, #{payType}, #{shipperName}, #{shipperId},
|
||||
#{queryType}, #{trajectoryCode}, #{finalServiceName}, #{desPort},
|
||||
#{weightType}, #{dimDivisor}, #{weightRule}, #{shipmentType}, #{dataFrom}, #{remarks},
|
||||
#{createName}, sysdate(), #{modifier}, sysdate(), sysdate(), sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateServiceChannel" parameterType="com.bms.masterdata.domain.ServiceChannel">
|
||||
update srv_service_channel
|
||||
set channel_code = #{channelCode},
|
||||
channel_name = #{channelName},
|
||||
service_code = #{serviceCode},
|
||||
service_name = #{serviceName},
|
||||
bl_open = #{blOpen},
|
||||
bl_multiple = #{blMultiple},
|
||||
cargo_type = #{cargoType},
|
||||
pay_type = #{payType},
|
||||
shipper_name = #{shipperName},
|
||||
shipper_id = #{shipperId},
|
||||
query_type = #{queryType},
|
||||
trajectory_code = #{trajectoryCode},
|
||||
final_service_name = #{finalServiceName},
|
||||
des_port = #{desPort},
|
||||
weight_type = #{weightType},
|
||||
dim_divisor = #{dimDivisor},
|
||||
weight_rule = #{weightRule},
|
||||
shipment_type = #{shipmentType},
|
||||
data_from = #{dataFrom},
|
||||
remarks = #{remarks},
|
||||
modifier = #{modifier},
|
||||
modify_date = sysdate(),
|
||||
gmt_modified = sysdate()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateServiceChannelStatus" parameterType="com.bms.masterdata.domain.ServiceChannel">
|
||||
update srv_service_channel
|
||||
set bl_open = #{blOpen},
|
||||
modifier = #{modifier},
|
||||
modify_date = sysdate(),
|
||||
gmt_modified = sysdate()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteServiceChannelByIds" parameterType="String">
|
||||
delete from srv_service_channel where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user