|
@@ -0,0 +1,518 @@
|
|
|
+<?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.steerinfo.dil.mapper.RmsDirectlySentCityMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsDirectlySentCity">
|
|
|
+ <id column="PRIMARY_KEY_ID" jdbcType="DECIMAL" property="primaryKeyId" />
|
|
|
+ <result column="DIRECTLY_SENT_NAME" jdbcType="VARCHAR" property="directlySentName" />
|
|
|
+ <result column="DISTRICT_CITY" jdbcType="VARCHAR" property="districtCity" />
|
|
|
+ <result column="TOWN_CITY" jdbcType="VARCHAR" property="townCity" />
|
|
|
+ <result column="PLACE" jdbcType="VARCHAR" property="place" />
|
|
|
+ <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
|
|
|
+ <result column="REMARK" jdbcType="VARCHAR" property="remark" />
|
|
|
+ <result column="ALTERNATE_FIELDS1" jdbcType="VARCHAR" property="alternateFields1" />
|
|
|
+ <result column="ALTERNATE_FIELDS2" jdbcType="VARCHAR" property="alternateFields2" />
|
|
|
+ <result column="ALTERNATE_FIELDS3" jdbcType="VARCHAR" property="alternateFields3" />
|
|
|
+ <result column="ALTERNATE_FIELDS4" jdbcType="VARCHAR" property="alternateFields4" />
|
|
|
+ <result column="ALTERNATE_FIELDS5" jdbcType="VARCHAR" property="alternateFields5" />
|
|
|
+ <result column="ALTERNATE_FIELDS6" jdbcType="VARCHAR" property="alternateFields6" />
|
|
|
+ <result column="ALTERNATE_FIELDS7" jdbcType="VARCHAR" property="alternateFields7" />
|
|
|
+ <result column="ALTERNATE_FIELDS8" jdbcType="VARCHAR" property="alternateFields8" />
|
|
|
+ <result column="PROVINCE_CITY" jdbcType="VARCHAR" property="provinceCity" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ PRIMARY_KEY_ID, DIRECTLY_SENT_NAME, DISTRICT_CITY, TOWN_CITY, PLACE, CARRIER_ID,
|
|
|
+ REMARK, ALTERNATE_FIELDS1, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, ALTERNATE_FIELDS4,
|
|
|
+ ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, ALTERNATE_FIELDS8, PROVINCE_CITY
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.PRIMARY_KEY_ID, t.DIRECTLY_SENT_NAME, t.DISTRICT_CITY, t.TOWN_CITY, t.PLACE, t.CARRIER_ID,
|
|
|
+ t.REMARK, t.ALTERNATE_FIELDS1, t.ALTERNATE_FIELDS2, t.ALTERNATE_FIELDS3, t.ALTERNATE_FIELDS4,
|
|
|
+ t.ALTERNATE_FIELDS5, t.ALTERNATE_FIELDS6, t.ALTERNATE_FIELDS7, t.ALTERNATE_FIELDS8,
|
|
|
+ t.PROVINCE_CITY
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns"/> FROM RMS_DIRECTLY_SENT_CITY
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias"/> FROM RMS_DIRECTLY_SENT_CITY t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="primaryKeyId != null">
|
|
|
+ and PRIMARY_KEY_ID = #{primaryKeyId}
|
|
|
+ </if>
|
|
|
+ <if test="directlySentName != null and directlySentName != ''">
|
|
|
+ and DIRECTLY_SENT_NAME = #{directlySentName}
|
|
|
+ </if>
|
|
|
+ <if test="districtCity != null and districtCity != ''">
|
|
|
+ and DISTRICT_CITY = #{districtCity}
|
|
|
+ </if>
|
|
|
+ <if test="townCity != null and townCity != ''">
|
|
|
+ and TOWN_CITY = #{townCity}
|
|
|
+ </if>
|
|
|
+ <if test="place != null and place != ''">
|
|
|
+ and PLACE = #{place}
|
|
|
+ </if>
|
|
|
+ <if test="carrierId != null">
|
|
|
+ and CARRIER_ID = #{carrierId}
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and REMARK = #{remark}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields1 != null and alternateFields1 != ''">
|
|
|
+ and ALTERNATE_FIELDS1 = #{alternateFields1}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null and alternateFields2 != ''">
|
|
|
+ and ALTERNATE_FIELDS2 = #{alternateFields2}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null and alternateFields3 != ''">
|
|
|
+ and ALTERNATE_FIELDS3 = #{alternateFields3}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null and alternateFields4 != ''">
|
|
|
+ and ALTERNATE_FIELDS4 = #{alternateFields4}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null and alternateFields5 != ''">
|
|
|
+ and ALTERNATE_FIELDS5 = #{alternateFields5}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null and alternateFields6 != ''">
|
|
|
+ and ALTERNATE_FIELDS6 = #{alternateFields6}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null and alternateFields7 != ''">
|
|
|
+ and ALTERNATE_FIELDS7 = #{alternateFields7}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null and alternateFields8 != ''">
|
|
|
+ and ALTERNATE_FIELDS8 = #{alternateFields8}
|
|
|
+ </if>
|
|
|
+ <if test="provinceCity != null and provinceCity != ''">
|
|
|
+ and PROVINCE_CITY = #{provinceCity}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="primaryKeyId != null">
|
|
|
+ and PRIMARY_KEY_ID = #{primaryKeyId}
|
|
|
+ </if>
|
|
|
+ <if test="directlySentName != null and directlySentName != ''">
|
|
|
+ and DIRECTLY_SENT_NAME LIKE '%${directlySentName}%'
|
|
|
+ </if>
|
|
|
+ <if test="districtCity != null and districtCity != ''">
|
|
|
+ and DISTRICT_CITY LIKE '%${districtCity}%'
|
|
|
+ </if>
|
|
|
+ <if test="townCity != null and townCity != ''">
|
|
|
+ and TOWN_CITY LIKE '%${townCity}%'
|
|
|
+ </if>
|
|
|
+ <if test="place != null and place != ''">
|
|
|
+ and PLACE LIKE '%${place}%'
|
|
|
+ </if>
|
|
|
+ <if test="carrierId != null">
|
|
|
+ and CARRIER_ID = #{carrierId}
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and REMARK LIKE '%${remark}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields1 != null and alternateFields1 != ''">
|
|
|
+ and ALTERNATE_FIELDS1 LIKE '%${alternateFields1}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null and alternateFields2 != ''">
|
|
|
+ and ALTERNATE_FIELDS2 LIKE '%${alternateFields2}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null and alternateFields3 != ''">
|
|
|
+ and ALTERNATE_FIELDS3 LIKE '%${alternateFields3}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null and alternateFields4 != ''">
|
|
|
+ and ALTERNATE_FIELDS4 LIKE '%${alternateFields4}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null and alternateFields5 != ''">
|
|
|
+ and ALTERNATE_FIELDS5 LIKE '%${alternateFields5}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null and alternateFields6 != ''">
|
|
|
+ and ALTERNATE_FIELDS6 LIKE '%${alternateFields6}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null and alternateFields7 != ''">
|
|
|
+ and ALTERNATE_FIELDS7 LIKE '%${alternateFields7}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null and alternateFields8 != ''">
|
|
|
+ and ALTERNATE_FIELDS8 LIKE '%${alternateFields8}%'
|
|
|
+ </if>
|
|
|
+ <if test="provinceCity != null and provinceCity != ''">
|
|
|
+ and PROVINCE_CITY LIKE '%${provinceCity}%'
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete from RMS_DIRECTLY_SENT_CITY
|
|
|
+ where PRIMARY_KEY_ID = #{primaryKeyId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from RMS_DIRECTLY_SENT_CITY
|
|
|
+ where 1!=1
|
|
|
+ <if test="directlySentName != null and directlySentName != ''">
|
|
|
+ or DIRECTLY_SENT_NAME = #{directlySentName}
|
|
|
+ </if>
|
|
|
+ <if test="districtCity != null and districtCity != ''">
|
|
|
+ or DISTRICT_CITY = #{districtCity}
|
|
|
+ </if>
|
|
|
+ <if test="townCity != null and townCity != ''">
|
|
|
+ or TOWN_CITY = #{townCity}
|
|
|
+ </if>
|
|
|
+ <if test="place != null and place != ''">
|
|
|
+ or PLACE = #{place}
|
|
|
+ </if>
|
|
|
+ <if test="carrierId != null">
|
|
|
+ or CARRIER_ID = #{carrierId}
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ or REMARK = #{remark}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields1 != null and alternateFields1 != ''">
|
|
|
+ or ALTERNATE_FIELDS1 = #{alternateFields1}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null and alternateFields2 != ''">
|
|
|
+ or ALTERNATE_FIELDS2 = #{alternateFields2}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null and alternateFields3 != ''">
|
|
|
+ or ALTERNATE_FIELDS3 = #{alternateFields3}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null and alternateFields4 != ''">
|
|
|
+ or ALTERNATE_FIELDS4 = #{alternateFields4}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null and alternateFields5 != ''">
|
|
|
+ or ALTERNATE_FIELDS5 = #{alternateFields5}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null and alternateFields6 != ''">
|
|
|
+ or ALTERNATE_FIELDS6 = #{alternateFields6}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null and alternateFields7 != ''">
|
|
|
+ or ALTERNATE_FIELDS7 = #{alternateFields7}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null and alternateFields8 != ''">
|
|
|
+ or ALTERNATE_FIELDS8 = #{alternateFields8}
|
|
|
+ </if>
|
|
|
+ <if test="provinceCity != null and provinceCity != ''">
|
|
|
+ or PROVINCE_CITY = #{provinceCity}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.RmsDirectlySentCity">
|
|
|
+ insert into RMS_DIRECTLY_SENT_CITY (PRIMARY_KEY_ID, DIRECTLY_SENT_NAME, DISTRICT_CITY,
|
|
|
+ TOWN_CITY, PLACE, CARRIER_ID,
|
|
|
+ REMARK, ALTERNATE_FIELDS1, ALTERNATE_FIELDS2,
|
|
|
+ ALTERNATE_FIELDS3, ALTERNATE_FIELDS4, ALTERNATE_FIELDS5,
|
|
|
+ ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, ALTERNATE_FIELDS8,
|
|
|
+ PROVINCE_CITY)
|
|
|
+ values (#{primaryKeyId,jdbcType=DECIMAL}, #{directlySentName,jdbcType=VARCHAR}, #{districtCity,jdbcType=VARCHAR},
|
|
|
+ #{townCity,jdbcType=VARCHAR}, #{place,jdbcType=VARCHAR}, #{carrierId,jdbcType=DECIMAL},
|
|
|
+ #{remark,jdbcType=VARCHAR}, #{alternateFields1,jdbcType=VARCHAR}, #{alternateFields2,jdbcType=VARCHAR},
|
|
|
+ #{alternateFields3,jdbcType=VARCHAR}, #{alternateFields4,jdbcType=VARCHAR}, #{alternateFields5,jdbcType=VARCHAR},
|
|
|
+ #{alternateFields6,jdbcType=VARCHAR}, #{alternateFields7,jdbcType=VARCHAR}, #{alternateFields8,jdbcType=VARCHAR},
|
|
|
+ #{provinceCity,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsDirectlySentCity">
|
|
|
+ insert into RMS_DIRECTLY_SENT_CITY
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="primaryKeyId != null">
|
|
|
+ PRIMARY_KEY_ID,
|
|
|
+ </if>
|
|
|
+ <if test="directlySentName != null">
|
|
|
+ DIRECTLY_SENT_NAME,
|
|
|
+ </if>
|
|
|
+ <if test="districtCity != null">
|
|
|
+ DISTRICT_CITY,
|
|
|
+ </if>
|
|
|
+ <if test="townCity != null">
|
|
|
+ TOWN_CITY,
|
|
|
+ </if>
|
|
|
+ <if test="place != null">
|
|
|
+ PLACE,
|
|
|
+ </if>
|
|
|
+ <if test="carrierId != null">
|
|
|
+ CARRIER_ID,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ REMARK,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields1 != null">
|
|
|
+ ALTERNATE_FIELDS1,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null">
|
|
|
+ ALTERNATE_FIELDS2,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null">
|
|
|
+ ALTERNATE_FIELDS3,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null">
|
|
|
+ ALTERNATE_FIELDS4,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null">
|
|
|
+ ALTERNATE_FIELDS5,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null">
|
|
|
+ ALTERNATE_FIELDS6,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null">
|
|
|
+ ALTERNATE_FIELDS7,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null">
|
|
|
+ ALTERNATE_FIELDS8,
|
|
|
+ </if>
|
|
|
+ <if test="provinceCity != null">
|
|
|
+ PROVINCE_CITY,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="primaryKeyId != null">
|
|
|
+ #{primaryKeyId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="directlySentName != null">
|
|
|
+ #{directlySentName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="districtCity != null">
|
|
|
+ #{districtCity,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="townCity != null">
|
|
|
+ #{townCity,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="place != null">
|
|
|
+ #{place,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="carrierId != null">
|
|
|
+ #{carrierId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields1 != null">
|
|
|
+ #{alternateFields1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null">
|
|
|
+ #{alternateFields2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null">
|
|
|
+ #{alternateFields3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null">
|
|
|
+ #{alternateFields4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null">
|
|
|
+ #{alternateFields5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null">
|
|
|
+ #{alternateFields6,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null">
|
|
|
+ #{alternateFields7,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null">
|
|
|
+ #{alternateFields8,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="provinceCity != null">
|
|
|
+ #{provinceCity,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsDirectlySentCity">
|
|
|
+ update RMS_DIRECTLY_SENT_CITY
|
|
|
+ set DIRECTLY_SENT_NAME = #{directlySentName,jdbcType=VARCHAR},
|
|
|
+ DISTRICT_CITY = #{districtCity,jdbcType=VARCHAR},
|
|
|
+ TOWN_CITY = #{townCity,jdbcType=VARCHAR},
|
|
|
+ PLACE = #{place,jdbcType=VARCHAR},
|
|
|
+ CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
|
+ REMARK = #{remark,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS1 = #{alternateFields1,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR},
|
|
|
+ PROVINCE_CITY = #{provinceCity,jdbcType=VARCHAR}
|
|
|
+ where PRIMARY_KEY_ID = #{primaryKeyId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsDirectlySentCity">
|
|
|
+ update RMS_DIRECTLY_SENT_CITY
|
|
|
+ <set>
|
|
|
+ <if test="directlySentName != null">
|
|
|
+ DIRECTLY_SENT_NAME = #{directlySentName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="districtCity != null">
|
|
|
+ DISTRICT_CITY = #{districtCity,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="townCity != null">
|
|
|
+ TOWN_CITY = #{townCity,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="place != null">
|
|
|
+ PLACE = #{place,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="carrierId != null">
|
|
|
+ CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ REMARK = #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields1 != null">
|
|
|
+ ALTERNATE_FIELDS1 = #{alternateFields1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null">
|
|
|
+ ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null">
|
|
|
+ ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null">
|
|
|
+ ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null">
|
|
|
+ ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null">
|
|
|
+ ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null">
|
|
|
+ ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null">
|
|
|
+ ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="provinceCity != null">
|
|
|
+ PROVINCE_CITY = #{provinceCity,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where PRIMARY_KEY_ID = #{primaryKeyId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ where PRIMARY_KEY_ID = #{primaryKeyId,jdbcType=DECIMAL}
|
|
|
+ </select>
|
|
|
+ <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ <include refid="where"/>
|
|
|
+ </select>
|
|
|
+ <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ <include refid="whereLike"/>
|
|
|
+ </select>
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
+ insert into RMS_DIRECTLY_SENT_CITY
|
|
|
+ (PRIMARY_KEY_ID,
|
|
|
+ DIRECTLY_SENT_NAME, DISTRICT_CITY,
|
|
|
+ TOWN_CITY, PLACE, CARRIER_ID,
|
|
|
+ REMARK, ALTERNATE_FIELDS1, ALTERNATE_FIELDS2,
|
|
|
+ ALTERNATE_FIELDS3, ALTERNATE_FIELDS4,
|
|
|
+ ALTERNATE_FIELDS5, ALTERNATE_FIELDS6,
|
|
|
+ ALTERNATE_FIELDS7, ALTERNATE_FIELDS8,
|
|
|
+ PROVINCE_CITY)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.primaryKeyId,jdbcType=DECIMAL},
|
|
|
+ #{item.directlySentName,jdbcType=VARCHAR}, #{item.districtCity,jdbcType=VARCHAR},
|
|
|
+ #{item.townCity,jdbcType=VARCHAR}, #{item.place,jdbcType=VARCHAR}, #{item.carrierId,jdbcType=DECIMAL},
|
|
|
+ #{item.remark,jdbcType=VARCHAR}, #{item.alternateFields1,jdbcType=VARCHAR}, #{item.alternateFields2,jdbcType=VARCHAR},
|
|
|
+ #{item.alternateFields3,jdbcType=VARCHAR}, #{item.alternateFields4,jdbcType=VARCHAR},
|
|
|
+ #{item.alternateFields5,jdbcType=VARCHAR}, #{item.alternateFields6,jdbcType=VARCHAR},
|
|
|
+ #{item.alternateFields7,jdbcType=VARCHAR}, #{item.alternateFields8,jdbcType=VARCHAR},
|
|
|
+ #{item.provinceCity,jdbcType=VARCHAR} from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update RMS_DIRECTLY_SENT_CITY
|
|
|
+ set
|
|
|
+ PRIMARY_KEY_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.primaryKeyId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,DIRECTLY_SENT_NAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.directlySentName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DISTRICT_CITY=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.districtCity,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,TOWN_CITY=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.townCity,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PLACE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.place,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CARRIER_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,REMARK=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.remark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS1=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.alternateFields1,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS2=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.alternateFields2,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS3=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.alternateFields3,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS4=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.alternateFields4,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS5=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.alternateFields5,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS6=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.alternateFields6,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS7=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.alternateFields7,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS8=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.alternateFields8,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PROVINCE_CITY=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_KEY_ID" close="end">
|
|
|
+ when #{item.primaryKeyId,jdbcType=DECIMAL} then #{item.provinceCity,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where PRIMARY_KEY_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.primaryKeyId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from RMS_DIRECTLY_SENT_CITY
|
|
|
+ where PRIMARY_KEY_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <select id="getDirectlySentCity" resultType="java.util.Map">
|
|
|
+ SELECT RDSC.DIRECTLY_SENT_NAME "directlySentName",
|
|
|
+ RDSC.REMARK "remark",
|
|
|
+ RDSC.ALTERNATE_FIELDS1 "ALTERNATE_FIELDS1",
|
|
|
+ RC.CARRIER_NAME "carrierName",
|
|
|
+ RDSC.PROVINCE_CITY "addressProvince",
|
|
|
+ RDSC.DISTRICT_CITY "addressDistrict",
|
|
|
+ RDSC.TOWN_CITY "addressTown",
|
|
|
+ RDSC.PRIMARY_KEY_ID "primaryKeyId"
|
|
|
+ FROM RMS_DIRECTLY_SENT_CITY RDSC
|
|
|
+ LEFT JOIN RMS_CARRIER RC ON RC.CARRIER_ID = RDSC.CARRIER_ID
|
|
|
+ <if test="con != null">
|
|
|
+ WHERE RDSC.DIRECTLY_SENT_NAME LIKE #{con}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="getMaxId" resultType="java.math.BigDecimal">
|
|
|
+ SELECT NVL(MAX(PRIMARY_KEY_ID),0) + 1 FROM RMS_DIRECTLY_SENT_CITY
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|