123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <?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.sooka.mapper.TgjjGtjkrxxMapper2">
- <sql id="global_name">
- ID,create_time,cd_time,cd_batch,cd_operation,cd_source,
- </sql>
- <sql id="global_value">
- #{ID},now(),#{cd_time},#{cd_batch},#{cd_operation},#{cd_source},
- </sql>
- <sql id="update_sql">
- create_time = now(),cd_batch = #{cd_batch},cd_operation = #{cd_operation},cd_source =#{cd_source},
- </sql>
- <resultMap type="com.sooka.model.bo.TgjjGtjkrxx" id="TgjjGtjkrxxResult">
- </resultMap>
- <parameterMap id="TgjjGtjkrxx" type="com.sooka.model.bo.TgjjGtjkrxx"></parameterMap>
- <sql id="selectTgjjGtjkrxxVo">
- select ID, GTJKRGJJZH, JKHTBH, GTJKRXM, GTJKRZJLX, GTJKRZJHM, YSR, CDGX, SJHM, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_gtjkrxx
- </sql>
- <select id="selectTgjjGtjkrxxList" parameterMap="TgjjGtjkrxx" resultMap="TgjjGtjkrxxResult">
- <include refid="selectTgjjGtjkrxxVo"/>
- <where>
- <if test="GTJKRGJJZH != null and GTJKRGJJZH != ''">and GTJKRGJJZH = #{GTJKRGJJZH}</if>
- <if test="JKHTBH != null and JKHTBH != ''">and JKHTBH = #{JKHTBH}</if>
- <if test="GTJKRXM != null and GTJKRXM != ''">and GTJKRXM = #{GTJKRXM}</if>
- <if test="GTJKRZJLX != null and GTJKRZJLX != ''">and GTJKRZJLX = #{GTJKRZJLX}</if>
- <if test="GTJKRZJHM != null and GTJKRZJHM != ''">and GTJKRZJHM = #{GTJKRZJHM}</if>
- <if test="YSR != null ">and YSR = #{YSR}</if>
- <if test="CDGX != null and CDGX != ''">and CDGX = #{CDGX}</if>
- <if test="SJHM != null and SJHM != ''">and SJHM = #{SJHM}</if>
- <if test="ZXBH != null and ZXBH != ''">and ZXBH = #{ZXBH}</if>
- <if test="lastUpdateTime != null ">and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
- <if test="CLLX != null ">and CLLX = #{CLLX}</if>
- <if test="search_begintime != null"> and LAST_UPDATE_TIME >= #{search_begintime}</if>
- <if test="search_endtime != null"> and LAST_UPDATE_TIME < #{search_endtime}</if>
- </where>
- </select>
- <select id="selectTgjjGtjkrxxById" parameterType="Long" resultMap="TgjjGtjkrxxResult">
- <include refid="selectTgjjGtjkrxxVo"/>
- where ID = #{ID}
- </select>
- <insert id="insertTgjjGtjkrxx" parameterMap="TgjjGtjkrxx" useGeneratedKeys="true" keyProperty="ID">
- insert into tgjj_gtjkrxx
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <include refid="global_name"></include>
- <if test="GTJKRGJJZH != null">GTJKRGJJZH,</if>
- <if test="JKHTBH != null">JKHTBH,</if>
- <if test="GTJKRXM != null">GTJKRXM,</if>
- <if test="GTJKRZJLX != null">GTJKRZJLX,</if>
- <if test="GTJKRZJHM != null">GTJKRZJHM,</if>
- <if test="YSR != null">YSR,</if>
- <if test="CDGX != null">CDGX,</if>
- <if test="SJHM != null">SJHM,</if>
- <if test="ZXBH != null">ZXBH,</if>
- <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
- <if test="CLLX != null">CLLX,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <include refid="global_value"></include>
- <if test="GTJKRGJJZH != null">#{GTJKRGJJZH},</if>
- <if test="JKHTBH != null">#{JKHTBH},</if>
- <if test="GTJKRXM != null">#{GTJKRXM},</if>
- <if test="GTJKRZJLX != null">#{GTJKRZJLX},</if>
- <if test="GTJKRZJHM != null">#{GTJKRZJHM},</if>
- <if test="YSR != null">#{YSR},</if>
- <if test="CDGX != null">#{CDGX},</if>
- <if test="SJHM != null">#{SJHM},</if>
- <if test="ZXBH != null">#{ZXBH},</if>
- <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
- <if test="CLLX != null">#{CLLX},</if>
- </trim>
- </insert>
- <update id="updateTgjjGtjkrxx" parameterMap="TgjjGtjkrxx">
- update tgjj_gtjkrxx
- <trim prefix="SET" suffixOverrides=",">
- <include refid="update_sql"></include>
- <if test="GTJKRGJJZH != null">GTJKRGJJZH = #{GTJKRGJJZH},</if>
- <if test="JKHTBH != null">JKHTBH = #{JKHTBH},</if>
- <if test="GTJKRXM != null">GTJKRXM = #{GTJKRXM},</if>
- <if test="GTJKRZJLX != null">GTJKRZJLX = #{GTJKRZJLX},</if>
- <if test="GTJKRZJHM != null">GTJKRZJHM = #{GTJKRZJHM},</if>
- <if test="YSR != null">YSR = #{YSR},</if>
- <if test="CDGX != null">CDGX = #{CDGX},</if>
- <if test="SJHM != null">SJHM = #{SJHM},</if>
- <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
- <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
- <if test="CLLX != null">CLLX = #{CLLX},</if>
- </trim>
- where ID = #{ID}
- </update>
- <select id="selectTgjjGtjkrxxList_select_gtjkrxx" resultMap="TgjjGtjkrxxResult" parameterMap="TgjjGtjkrxx">
- <include refid="selectTgjjGtjkrxxVo"/>
- <where>
- <if test="JKHTBH != null and JKHTBH != ''">
- and JKHTBH = #{JKHTBH}
- </if>
- <if test="GTJKRXM != null and GTJKRXM != ''">
- and GTJKRXM = #{GTJKRXM}
- </if>
- </where>
- </select>
- </mapper>
|