|
@@ -0,0 +1,91 @@
|
|
|
+<?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.iamberry.rst.service.order.mapper.LogisticsInfoMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="LogisticsInfo" >
|
|
|
+ <result column="logistics_id" property="logisticsId" />
|
|
|
+ <result column="logistics_name" property="logisticsName" />
|
|
|
+ <result column="logistics_rst_code" property="logisticsRstCode" />
|
|
|
+ <result column="logistics_efast_code" property="logisticsEfastCode" />
|
|
|
+ <result column="logistics_onehundred_code" property="logisticsOnehundredCode" />
|
|
|
+ <result column="logistics_reamk" property="logisticsReamk" />
|
|
|
+ <result column="create_date" property="createDate" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_List" >
|
|
|
+ t.logistics_id,
|
|
|
+ t.logistics_name,
|
|
|
+ t.logistics_rst_code,
|
|
|
+ t.logistics_efast_code,
|
|
|
+ t.logistics_onehundred_code,
|
|
|
+ t.logistics_reamk,
|
|
|
+ t.create_date
|
|
|
+ </sql>
|
|
|
+ <select id="getLogisticsInfoList" resultMap="BaseResultMap" parameterType="LogisticsInfo" >
|
|
|
+ select
|
|
|
+ <include refid="Base_List" />
|
|
|
+ from tb_rst_logistics_info t
|
|
|
+ <where>
|
|
|
+ <if test="logisticsId != null ">
|
|
|
+ AND t.logistics_id = #{logisticsId}
|
|
|
+ </if >
|
|
|
+ <if test="logisticsName != null and logisticsName != ''">
|
|
|
+ AND t.logistics_name = #{logisticsName}
|
|
|
+ </if >
|
|
|
+ <if test="logisticsRstCode != null and logisticsRstCode != ''">
|
|
|
+ AND t.logistics_rst_code = #{logisticsRstCode}
|
|
|
+ </if >
|
|
|
+ <if test="logisticsEfastCode != null and logisticsEfastCode != ''">
|
|
|
+ AND t.logistics_efast_code = #{logisticsEfastCode}
|
|
|
+ </if >
|
|
|
+ <if test="logisticsOnehundredCode != null and logisticsOnehundredCode != ''">
|
|
|
+ AND t.logistics_onehundred_code = #{logisticsOnehundredCode}
|
|
|
+ </if >
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="getLogisticsInfoById" resultMap="BaseResultMap" parameterType="Integer" >
|
|
|
+ select
|
|
|
+ <include refid="Base_List" />
|
|
|
+ from tb_rst_logistics_info t
|
|
|
+ where t.logistics_id= #{logisticsId}
|
|
|
+ </select>
|
|
|
+ <insert id="save" parameterType="LogisticsInfo" >
|
|
|
+ insert into
|
|
|
+ tb_rst_logistics_info
|
|
|
+ (
|
|
|
+ logistics_name,
|
|
|
+ logistics_rst_code,
|
|
|
+ logistics_efast_code,
|
|
|
+ logistics_onehundred_code,
|
|
|
+ logistics_reamk
|
|
|
+ )
|
|
|
+ values
|
|
|
+ (
|
|
|
+ #{logisticsName},
|
|
|
+ #{logisticsRstCode},
|
|
|
+ #{logisticsEfastCode},
|
|
|
+ #{logisticsOnehundredCode},
|
|
|
+ #{logisticsReamk}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <update id="update" parameterType="LogisticsInfo" >
|
|
|
+ update
|
|
|
+ tb_rst_logistics_info
|
|
|
+ <set >
|
|
|
+ <if test="logisticsName != null and logisticsName != ''">
|
|
|
+ logistics_name = #{logisticsName},
|
|
|
+ </if >
|
|
|
+ <if test="logisticsRstCode != null and logisticsRstCode != ''">
|
|
|
+ logistics_rst_code = #{logisticsRstCode},
|
|
|
+ </if >
|
|
|
+ <if test="logisticsEfastCode != null and logisticsEfastCode != ''">
|
|
|
+ logistics_efast_code = #{logisticsEfastCode},
|
|
|
+ </if >
|
|
|
+ <if test="logisticsOnehundredCode != null and logisticsOnehundredCode != ''">
|
|
|
+ logistics_onehundred_code = #{logisticsOnehundredCode},
|
|
|
+ </if >
|
|
|
+ <if test="logisticsReamk != null and logisticsReamk != ''">
|
|
|
+ logistics_reamk = #{logisticsReamk},
|
|
|
+ </if >
|
|
|
+ </set >
|
|
|
+ where logistics_id= #{logisticsId}
|
|
|
+ </update>
|
|
|
+</mapper>
|