|
@@ -0,0 +1,188 @@
|
|
|
+<?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.DilCapacityTimesMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.DilCapacityTimes">
|
|
|
+ <id column="TIMES_ID" jdbcType="DECIMAL" property="timesId" />
|
|
|
+ <result column="TIMES_VALUE" jdbcType="TIMESTAMP" property="timesValue" />
|
|
|
+ <result column="TIMES_TYPE" jdbcType="DECIMAL" property="timesType" />
|
|
|
+ <result column="TIMES_REMARK" jdbcType="DECIMAL" property="timesRemark" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ TIMES_ID, TIMES_VALUE, TIMES_TYPE, TIMES_REMARK
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.TIMES_ID, t.TIMES_VALUE, t.TIMES_TYPE, t.TIMES_REMARK
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns"/> FROM DIL_CAPACITY_TIMES
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias"/> FROM DIL_CAPACITY_TIMES t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="timesId != null">
|
|
|
+ and TIMES_ID = #{timesId}
|
|
|
+ </if>
|
|
|
+ <if test="timesValue != null">
|
|
|
+ and TO_CHAR(TIMES_VALUE,'yyyy-MM-dd') = #{timesValue}
|
|
|
+ </if>
|
|
|
+ <if test="timesType != null">
|
|
|
+ and TIMES_TYPE = #{timesType}
|
|
|
+ </if>
|
|
|
+ <if test="timesRemark != null">
|
|
|
+ and TIMES_REMARK = #{timesRemark}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="timesId != null">
|
|
|
+ and TIMES_ID = #{timesId}
|
|
|
+ </if>
|
|
|
+ <if test="timesValue != null">
|
|
|
+ and TO_CHAR(TIMES_VALUE,'yyyy-MM-dd') = #{timesValue}
|
|
|
+ </if>
|
|
|
+ <if test="timesType != null">
|
|
|
+ and TIMES_TYPE = #{timesType}
|
|
|
+ </if>
|
|
|
+ <if test="timesRemark != null">
|
|
|
+ and TIMES_REMARK = #{timesRemark}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete from DIL_CAPACITY_TIMES
|
|
|
+ where TIMES_ID = #{timesId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from DIL_CAPACITY_TIMES
|
|
|
+ where 1!=1
|
|
|
+ <if test="timesValue != null">
|
|
|
+ or TO_CHAR(TIMES_VALUE,'yyyy-MM-dd') = '#{timesValue}'
|
|
|
+ </if>
|
|
|
+ <if test="timesType != null">
|
|
|
+ or TIMES_TYPE = #{timesType}
|
|
|
+ </if>
|
|
|
+ <if test="timesRemark != null">
|
|
|
+ or TIMES_REMARK = #{timesRemark}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.DilCapacityTimes">
|
|
|
+ insert into DIL_CAPACITY_TIMES (TIMES_ID, TIMES_VALUE, TIMES_TYPE,
|
|
|
+ TIMES_REMARK)
|
|
|
+ values (#{timesId,jdbcType=DECIMAL}, #{timesValue,jdbcType=TIMESTAMP}, #{timesType,jdbcType=DECIMAL},
|
|
|
+ #{timesRemark,jdbcType=DECIMAL})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.DilCapacityTimes">
|
|
|
+ insert into DIL_CAPACITY_TIMES
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="timesId != null">
|
|
|
+ TIMES_ID,
|
|
|
+ </if>
|
|
|
+ <if test="timesValue != null">
|
|
|
+ TIMES_VALUE,
|
|
|
+ </if>
|
|
|
+ <if test="timesType != null">
|
|
|
+ TIMES_TYPE,
|
|
|
+ </if>
|
|
|
+ <if test="timesRemark != null">
|
|
|
+ TIMES_REMARK,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="timesId != null">
|
|
|
+ #{timesId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="timesValue != null">
|
|
|
+ #{timesValue,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="timesType != null">
|
|
|
+ #{timesType,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="timesRemark != null">
|
|
|
+ #{timesRemark,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.DilCapacityTimes">
|
|
|
+ update DIL_CAPACITY_TIMES
|
|
|
+ set TIMES_VALUE = #{timesValue,jdbcType=TIMESTAMP},
|
|
|
+ TIMES_TYPE = #{timesType,jdbcType=DECIMAL},
|
|
|
+ TIMES_REMARK = #{timesRemark,jdbcType=DECIMAL}
|
|
|
+ where TIMES_ID = #{timesId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.DilCapacityTimes">
|
|
|
+ update DIL_CAPACITY_TIMES
|
|
|
+ <set>
|
|
|
+ <if test="timesValue != null">
|
|
|
+ TIMES_VALUE = #{timesValue,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="timesType != null">
|
|
|
+ TIMES_TYPE = #{timesType,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="timesRemark != null">
|
|
|
+ TIMES_REMARK = #{timesRemark,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where TIMES_ID = #{timesId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ where TIMES_ID = #{timesId,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_CAPACITY_TIMES
|
|
|
+ (TIMES_ID,
|
|
|
+ TIMES_VALUE, TIMES_TYPE, TIMES_REMARK
|
|
|
+ )
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.timesId,jdbcType=DECIMAL},
|
|
|
+ #{item.timesValue,jdbcType=TIMESTAMP}, #{item.timesType,jdbcType=DECIMAL}, #{item.timesRemark,jdbcType=DECIMAL}
|
|
|
+ from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update DIL_CAPACITY_TIMES
|
|
|
+ set
|
|
|
+ TIMES_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
+ when #{item.timesId,jdbcType=DECIMAL} then #{item.timesId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TIMES_VALUE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
+ when #{item.timesId,jdbcType=DECIMAL} then #{item.timesValue,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,TIMES_TYPE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
+ when #{item.timesId,jdbcType=DECIMAL} then #{item.timesType,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TIMES_REMARK=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
+ when #{item.timesId,jdbcType=DECIMAL} then #{item.timesRemark,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ where TIMES_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.timesId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from DIL_CAPACITY_TIMES
|
|
|
+ where TIMES_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+
|
|
|
+</mapper>
|