|
@@ -0,0 +1,525 @@
|
|
|
|
|
+<?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.DilAppCidMapper">
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.DilAppCid">
|
|
|
|
|
+ <id column="PRIMARY_ID" jdbcType="DECIMAL" property="primaryId" />
|
|
|
|
|
+ <result column="USER_CODE" jdbcType="VARCHAR" property="userCode" />
|
|
|
|
|
+ <result column="CID" jdbcType="VARCHAR" property="cid" />
|
|
|
|
|
+ <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
|
|
|
|
|
+ <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
|
|
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
|
|
+ <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
|
|
+ <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
|
|
+ <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
|
|
|
|
|
+ <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" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="columns">
|
|
|
|
|
+ PRIMARY_ID, USER_CODE, CID, INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME,
|
|
|
|
|
+ INSERT_UPDATE_REMARK, DELETED, ALTERNATE_FIELDS1, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3,
|
|
|
|
|
+ ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, ALTERNATE_FIELDS8
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="columns_alias">
|
|
|
|
|
+ t.PRIMARY_ID, t.USER_CODE, t.CID, t.INSERT_TIME, t.INSERT_USERNAME, t.UPDATE_TIME,
|
|
|
|
|
+ t.UPDATE_USERNAME, t.INSERT_UPDATE_REMARK, t.DELETED, t.ALTERNATE_FIELDS1, t.ALTERNATE_FIELDS2,
|
|
|
|
|
+ t.ALTERNATE_FIELDS3, t.ALTERNATE_FIELDS4, t.ALTERNATE_FIELDS5, t.ALTERNATE_FIELDS6,
|
|
|
|
|
+ t.ALTERNATE_FIELDS7, t.ALTERNATE_FIELDS8
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="select">
|
|
|
|
|
+ SELECT <include refid="columns"/> FROM DIL_APP_CID
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="select_alias">
|
|
|
|
|
+ SELECT <include refid="columns_alias"/> FROM DIL_APP_CID t
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="where">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="primaryId != null">
|
|
|
|
|
+ and PRIMARY_ID = #{primaryId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="userCode != null and userCode != ''">
|
|
|
|
|
+ and USER_CODE = #{userCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cid != null and cid != ''">
|
|
|
|
|
+ and CID = #{cid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertTime != null">
|
|
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
|
|
+ and INSERT_USERNAME = #{insertUsername}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
|
|
+ and UPDATE_USERNAME = #{updateUsername}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
|
|
+ and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
|
+ and DELETED = #{deleted}
|
|
|
|
|
+ </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>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="whereLike">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="primaryId != null">
|
|
|
|
|
+ and PRIMARY_ID = #{primaryId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="userCode != null and userCode != ''">
|
|
|
|
|
+ and USER_CODE LIKE '%${userCode}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cid != null and cid != ''">
|
|
|
|
|
+ and CID LIKE '%${cid}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertTime != null">
|
|
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
|
|
+ and INSERT_USERNAME LIKE '%${insertUsername}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
|
|
+ and UPDATE_USERNAME LIKE '%${updateUsername}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
|
|
+ and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
|
+ and DELETED = #{deleted}
|
|
|
|
|
+ </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>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
|
|
+ delete from DIL_APP_CID
|
|
|
|
|
+ where PRIMARY_ID = #{primaryId,jdbcType=DECIMAL}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
|
+ delete from DIL_APP_CID
|
|
|
|
|
+ where 1!=1
|
|
|
|
|
+ <if test="userCode != null and userCode != ''">
|
|
|
|
|
+ or USER_CODE = #{userCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cid != null and cid != ''">
|
|
|
|
|
+ or CID = #{cid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertTime != null">
|
|
|
|
|
+ or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
|
|
+ or INSERT_USERNAME = #{insertUsername}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
|
|
+ or UPDATE_USERNAME = #{updateUsername}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
|
|
+ or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
|
+ or DELETED = #{deleted}
|
|
|
|
|
+ </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>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.DilAppCid">
|
|
|
|
|
+ insert into DIL_APP_CID (PRIMARY_ID, USER_CODE, CID,
|
|
|
|
|
+ INSERT_TIME, INSERT_USERNAME, UPDATE_TIME,
|
|
|
|
|
+ UPDATE_USERNAME, INSERT_UPDATE_REMARK, DELETED,
|
|
|
|
|
+ ALTERNATE_FIELDS1, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3,
|
|
|
|
|
+ ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, ALTERNATE_FIELDS6,
|
|
|
|
|
+ ALTERNATE_FIELDS7, ALTERNATE_FIELDS8)
|
|
|
|
|
+ values (#{primaryId,jdbcType=DECIMAL}, #{userCode,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR},
|
|
|
|
|
+ #{insertTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{updateUsername,jdbcType=VARCHAR}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
|
|
|
|
|
+ #{alternateFields1,jdbcType=VARCHAR}, #{alternateFields2,jdbcType=VARCHAR}, #{alternateFields3,jdbcType=VARCHAR},
|
|
|
|
|
+ #{alternateFields4,jdbcType=VARCHAR}, #{alternateFields5,jdbcType=VARCHAR}, #{alternateFields6,jdbcType=VARCHAR},
|
|
|
|
|
+ #{alternateFields7,jdbcType=VARCHAR}, #{alternateFields8,jdbcType=VARCHAR})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.DilAppCid">
|
|
|
|
|
+ insert into DIL_APP_CID
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="primaryId != null">
|
|
|
|
|
+ PRIMARY_ID,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="userCode != null">
|
|
|
|
|
+ USER_CODE,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cid != null">
|
|
|
|
|
+ CID,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertTime != null">
|
|
|
|
|
+ INSERT_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUsername != null">
|
|
|
|
|
+ INSERT_USERNAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ UPDATE_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUsername != null">
|
|
|
|
|
+ UPDATE_USERNAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
|
|
+ INSERT_UPDATE_REMARK,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
|
+ DELETED,
|
|
|
|
|
+ </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>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="primaryId != null">
|
|
|
|
|
+ #{primaryId,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="userCode != null">
|
|
|
|
|
+ #{userCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cid != null">
|
|
|
|
|
+ #{cid,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertTime != null">
|
|
|
|
|
+ #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUsername != null">
|
|
|
|
|
+ #{insertUsername,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUsername != null">
|
|
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
|
|
+ #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
|
+ #{deleted,jdbcType=DECIMAL},
|
|
|
|
|
+ </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>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.DilAppCid">
|
|
|
|
|
+ update DIL_APP_CID
|
|
|
|
|
+ set USER_CODE = #{userCode,jdbcType=VARCHAR},
|
|
|
|
|
+ CID = #{cid,jdbcType=VARCHAR},
|
|
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
|
|
+ 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}
|
|
|
|
|
+ where PRIMARY_ID = #{primaryId,jdbcType=DECIMAL}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.DilAppCid">
|
|
|
|
|
+ update DIL_APP_CID
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="userCode != null">
|
|
|
|
|
+ USER_CODE = #{userCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cid != null">
|
|
|
|
|
+ CID = #{cid,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertTime != null">
|
|
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUsername != null">
|
|
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUsername != null">
|
|
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
|
|
+ </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>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where PRIMARY_ID = #{primaryId,jdbcType=DECIMAL}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
|
|
+ <include refid="select"/>
|
|
|
|
|
+ where PRIMARY_ID = #{primaryId,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 DIL_APP_CID
|
|
|
|
|
+ (PRIMARY_ID,
|
|
|
|
|
+ USER_CODE, CID, INSERT_TIME,
|
|
|
|
|
+ INSERT_USERNAME, UPDATE_TIME,
|
|
|
|
|
+ UPDATE_USERNAME, INSERT_UPDATE_REMARK,
|
|
|
|
|
+ DELETED, ALTERNATE_FIELDS1, ALTERNATE_FIELDS2,
|
|
|
|
|
+ ALTERNATE_FIELDS3, ALTERNATE_FIELDS4,
|
|
|
|
|
+ ALTERNATE_FIELDS5, ALTERNATE_FIELDS6,
|
|
|
|
|
+ ALTERNATE_FIELDS7, ALTERNATE_FIELDS8
|
|
|
|
|
+ )
|
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
|
+ select
|
|
|
|
|
+ #{item.primaryId,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.userCode,jdbcType=VARCHAR}, #{item.cid,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{item.insertUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{item.updateUsername,jdbcType=VARCHAR}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.deleted,jdbcType=DECIMAL}, #{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}
|
|
|
|
|
+ from dual
|
|
|
|
|
+ </foreach> )
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
|
+ update DIL_APP_CID
|
|
|
|
|
+ set
|
|
|
|
|
+ PRIMARY_ID=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.primaryId,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,USER_CODE=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.userCode,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CID=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.cid,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,INSERT_TIME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,INSERT_USERNAME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,UPDATE_TIME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,DELETED=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ALTERNATE_FIELDS1=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields1,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ALTERNATE_FIELDS2=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields2,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ALTERNATE_FIELDS3=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields3,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ALTERNATE_FIELDS4=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields4,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ALTERNATE_FIELDS5=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields5,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ALTERNATE_FIELDS6=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields6,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ALTERNATE_FIELDS7=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields7,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ALTERNATE_FIELDS8=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
|
|
|
|
|
+ when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields8,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ where PRIMARY_ID in
|
|
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
|
|
+ #{item.primaryId,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
|
+ delete from DIL_APP_CID
|
|
|
|
|
+ where PRIMARY_ID in
|
|
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
|
|
+ #{id}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
+
|
|
|
|
|
+</mapper>
|