| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371 |
- <?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.TmsPleaseApproveMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmsPleaseApprove">
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
- <result column="SENDSTATION" jdbcType="VARCHAR" property="sendstation" />
- <result column="PLEASE_TIME" jdbcType="TIMESTAMP" property="pleaseTime" />
- <result column="PLEASE_NUMBER" jdbcType="DECIMAL" property="pleaseNumber" />
- <result column="APPROVE_NUMBER" jdbcType="DECIMAL" property="approveNumber" />
- <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="REMARK" jdbcType="VARCHAR" property="remark" />
- <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
- </resultMap>
- <sql id="columns">
- RESULT_ID, SENDSTATION, PLEASE_TIME, PLEASE_NUMBER, APPROVE_NUMBER, INSERT_TIME,
- INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME, REMARK, DELETED
- </sql>
- <sql id="columns_alias">
- t.RESULT_ID, t.SENDSTATION, t.PLEASE_TIME, t.PLEASE_NUMBER, t.APPROVE_NUMBER, t.INSERT_TIME,
- t.INSERT_USERNAME, t.UPDATE_TIME, t.UPDATE_USERNAME, t.REMARK, t.DELETED
- </sql>
- <sql id="select">
- SELECT <include refid="columns"/> FROM TMS_PLEASE_APPROVE
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias"/> FROM TMS_PLEASE_APPROVE t
- </sql>
- <sql id="where">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="sendstation != null and sendstation != ''">
- and SENDSTATION = #{sendstation}
- </if>
- <if test="pleaseTime != null">
- and TO_CHAR(PLEASE_TIME,'yyyy-MM-dd') = #{pleaseTime}
- </if>
- <if test="pleaseNumber != null">
- and PLEASE_NUMBER = #{pleaseNumber}
- </if>
- <if test="approveNumber != null">
- and APPROVE_NUMBER = #{approveNumber}
- </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="remark != null and remark != ''">
- and REMARK = #{remark}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="sendstation != null and sendstation != ''">
- and SENDSTATION LIKE '%${sendstation}%'
- </if>
- <if test="pleaseTime != null">
- and TO_CHAR(PLEASE_TIME,'yyyy-MM-dd') = #{pleaseTime}
- </if>
- <if test="pleaseNumber != null">
- and PLEASE_NUMBER = #{pleaseNumber}
- </if>
- <if test="approveNumber != null">
- and APPROVE_NUMBER = #{approveNumber}
- </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="remark != null and remark != ''">
- and REMARK LIKE '%${remark}%'
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from TMS_PLEASE_APPROVE
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from TMS_PLEASE_APPROVE
- where 1!=1
- <if test="sendstation != null and sendstation != ''">
- or SENDSTATION = #{sendstation}
- </if>
- <if test="pleaseTime != null">
- or TO_CHAR(PLEASE_TIME,'yyyy-MM-dd') = '#{pleaseTime}'
- </if>
- <if test="pleaseNumber != null">
- or PLEASE_NUMBER = #{pleaseNumber}
- </if>
- <if test="approveNumber != null">
- or APPROVE_NUMBER = #{approveNumber}
- </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="remark != null and remark != ''">
- or REMARK = #{remark}
- </if>
- <if test="deleted != null">
- or DELETED = #{deleted}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.TmsPleaseApprove">
- insert into TMS_PLEASE_APPROVE (RESULT_ID, SENDSTATION, PLEASE_TIME,
- PLEASE_NUMBER, APPROVE_NUMBER, INSERT_TIME,
- INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME,
- REMARK, DELETED)
- values (#{resultId,jdbcType=DECIMAL}, #{sendstation,jdbcType=VARCHAR}, #{pleaseTime,jdbcType=TIMESTAMP},
- #{pleaseNumber,jdbcType=DECIMAL}, #{approveNumber,jdbcType=DECIMAL}, #{insertTime,jdbcType=TIMESTAMP},
- #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
- #{remark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmsPleaseApprove">
- insert into TMS_PLEASE_APPROVE
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- RESULT_ID,
- </if>
- <if test="sendstation != null">
- SENDSTATION,
- </if>
- <if test="pleaseTime != null">
- PLEASE_TIME,
- </if>
- <if test="pleaseNumber != null">
- PLEASE_NUMBER,
- </if>
- <if test="approveNumber != null">
- APPROVE_NUMBER,
- </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="remark != null">
- REMARK,
- </if>
- <if test="deleted != null">
- DELETED,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- #{resultId,jdbcType=DECIMAL},
- </if>
- <if test="sendstation != null">
- #{sendstation,jdbcType=VARCHAR},
- </if>
- <if test="pleaseTime != null">
- #{pleaseTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pleaseNumber != null">
- #{pleaseNumber,jdbcType=DECIMAL},
- </if>
- <if test="approveNumber != null">
- #{approveNumber,jdbcType=DECIMAL},
- </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="remark != null">
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="deleted != null">
- #{deleted,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmsPleaseApprove">
- update TMS_PLEASE_APPROVE
- set SENDSTATION = #{sendstation,jdbcType=VARCHAR},
- PLEASE_TIME = #{pleaseTime,jdbcType=TIMESTAMP},
- PLEASE_NUMBER = #{pleaseNumber,jdbcType=DECIMAL},
- APPROVE_NUMBER = #{approveNumber,jdbcType=DECIMAL},
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- REMARK = #{remark,jdbcType=VARCHAR},
- DELETED = #{deleted,jdbcType=DECIMAL}
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmsPleaseApprove">
- update TMS_PLEASE_APPROVE
- <set>
- <if test="sendstation != null">
- SENDSTATION = #{sendstation,jdbcType=VARCHAR},
- </if>
- <if test="pleaseTime != null">
- PLEASE_TIME = #{pleaseTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pleaseNumber != null">
- PLEASE_NUMBER = #{pleaseNumber,jdbcType=DECIMAL},
- </if>
- <if test="approveNumber != null">
- APPROVE_NUMBER = #{approveNumber,jdbcType=DECIMAL},
- </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="remark != null">
- REMARK = #{remark,jdbcType=VARCHAR},
- </if>
- <if test="deleted != null">
- DELETED = #{deleted,jdbcType=DECIMAL},
- </if>
- </set>
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select"/>
- where RESULT_ID = #{resultId,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 TMS_PLEASE_APPROVE
- (RESULT_ID,
- SENDSTATION, PLEASE_TIME, PLEASE_NUMBER,
- APPROVE_NUMBER, INSERT_TIME,
- INSERT_USERNAME, UPDATE_TIME,
- UPDATE_USERNAME, REMARK, DELETED
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.resultId,jdbcType=DECIMAL},
- #{item.sendstation,jdbcType=VARCHAR}, #{item.pleaseTime,jdbcType=TIMESTAMP}, #{item.pleaseNumber,jdbcType=DECIMAL},
- #{item.approveNumber,jdbcType=DECIMAL}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.remark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update TMS_PLEASE_APPROVE
- set
- RESULT_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- ,SENDSTATION=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.sendstation,jdbcType=VARCHAR}
- </foreach>
- ,PLEASE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.pleaseTime,jdbcType=TIMESTAMP}
- </foreach>
- ,PLEASE_NUMBER=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.pleaseNumber,jdbcType=DECIMAL}
- </foreach>
- ,APPROVE_NUMBER=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.approveNumber,jdbcType=DECIMAL}
- </foreach>
- ,INSERT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,REMARK=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.remark,jdbcType=VARCHAR}
- </foreach>
- ,DELETED=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- where RESULT_ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from TMS_PLEASE_APPROVE
- where RESULT_ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="getTmsPleaseApproveList" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <include refid="where"/>
- </select>
- </mapper>
|