123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <?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.TgjjGrxxMapper2">
- <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.TgjjGrxx" id="TgjjGrxxResult">
- </resultMap>
- <parameterMap id="TgjjGrxx" type="com.sooka.model.bo.TgjjGrxx"></parameterMap>
- <sql id="selectTgjjGrxxVo">
- select ID, GRZH, XINGMING, XMQP, XINGBIE, GDDHHM, SJHM, ZJLX, ZJHM, CSNY, HYZK, ZHIYE, ZHICHEN, ZHIWU, XUELI, YZBM, JTZZ, JTYSR, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_grxx
- </sql>
- <select id="selectTgjjGrxxList" parameterMap="TgjjGrxx" resultMap="TgjjGrxxResult">
- <include refid="selectTgjjGrxxVo"/>
- <where>
- <if test="GRZH != null and GRZH != ''"> and GRZH = #{GRZH}</if>
- <if test="XINGMING != null and XINGMING != ''"> and XINGMING = #{XINGMING}</if>
- <if test="XMQP != null and XMQP != ''"> and XMQP = #{XMQP}</if>
- <if test="XINGBIE != null and XINGBIE != ''"> and XINGBIE = #{XINGBIE}</if>
- <if test="GDDHHM != null and GDDHHM != ''"> and GDDHHM = #{GDDHHM}</if>
- <if test="SJHM != null and SJHM != ''"> and SJHM = #{SJHM}</if>
- <if test="ZJLX != null and ZJLX != ''"> and ZJLX = #{ZJLX}</if>
- <if test="ZJHM != null and ZJHM != ''"> and ZJHM = #{ZJHM}</if>
- <if test="CSNY != null and CSNY != ''"> and CSNY = #{CSNY}</if>
- <if test="HYZK != null and HYZK != ''"> and HYZK = #{HYZK}</if>
- <if test="ZHIYE != null and ZHIYE != ''"> and ZHIYE = #{ZHIYE}</if>
- <if test="ZHICHEN != null and ZHICHEN != ''"> and ZHICHEN = #{ZHICHEN}</if>
- <if test="ZHIWU != null and ZHIWU != ''"> and ZHIWU = #{ZHIWU}</if>
- <if test="XUELI != null and XUELI != ''"> and XUELI = #{XUELI}</if>
- <if test="YZBM != null and YZBM != ''"> and YZBM = #{YZBM}</if>
- <if test="JTZZ != null and JTZZ != ''"> and JTZZ = #{JTZZ}</if>
- <if test="JTYSR != null "> and JTYSR = #{JTYSR}</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="selectTgjjGrxxById" parameterType="Long" resultMap="TgjjGrxxResult">
- <include refid="selectTgjjGrxxVo"/>
- where ID = #{ID
- </select>
- <insert id="insertTgjjGrxx" parameterMap="TgjjGrxx" useGeneratedKeys="true" keyProperty="ID">
- insert into tgjj_grxx
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <include refid="global_name"></include>
- <if test="GRZH != null and GRZH != ''">GRZH,</if>
- <if test="XINGMING != null">XINGMING,</if>
- <if test="XMQP != null">XMQP,</if>
- <if test="XINGBIE != null">XINGBIE,</if>
- <if test="GDDHHM != null">GDDHHM,</if>
- <if test="SJHM != null">SJHM,</if>
- <if test="ZJLX != null">ZJLX,</if>
- <if test="ZJHM != null">ZJHM,</if>
- <if test="CSNY != null">CSNY,</if>
- <if test="HYZK != null">HYZK,</if>
- <if test="ZHIYE != null">ZHIYE,</if>
- <if test="ZHICHEN != null">ZHICHEN,</if>
- <if test="ZHIWU != null">ZHIWU,</if>
- <if test="XUELI != null">XUELI,</if>
- <if test="YZBM != null">YZBM,</if>
- <if test="JTZZ != null">JTZZ,</if>
- <if test="JTYSR != null">JTYSR,</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="GRZH != null and GRZH != ''">#{GRZH},</if>
- <if test="XINGMING != null">#{XINGMING},</if>
- <if test="XMQP != null">#{XMQP},</if>
- <if test="XINGBIE != null">#{XINGBIE},</if>
- <if test="GDDHHM != null">#{GDDHHM},</if>
- <if test="SJHM != null">#{SJHM},</if>
- <if test="ZJLX != null">#{ZJLX},</if>
- <if test="ZJHM != null">#{ZJHM},</if>
- <if test="CSNY != null">#{CSNY},</if>
- <if test="HYZK != null">#{HYZK},</if>
- <if test="ZHIYE != null">#{ZHIYE},</if>
- <if test="ZHICHEN != null">#{ZHICHEN},</if>
- <if test="ZHIWU != null">#{ZHIWU},</if>
- <if test="XUELI != null">#{XUELI},</if>
- <if test="YZBM != null">#{YZBM},</if>
- <if test="JTZZ != null">#{JTZZ},</if>
- <if test="JTYSR != null">#{JTYSR},</if>
- <if test="ZXBH != null">#{ZXBH},</if>
- <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
- <if test="CLLX != null">#{CLLX},</if>
- </trim>
- </insert>
- <update id="updateTgjjGrxx" parameterMap="TgjjGrxx">
- update tgjj_grxx
- <trim prefix="SET" suffixOverrides=",">
- <include refid="update_sql"></include>
- <if test="GRZH != null and GRZH != ''">GRZH = #{GRZH},</if>
- <if test="XINGMING != null">XINGMING = #{XINGMING},</if>
- <if test="XMQP != null">XMQP = #{XMQP},</if>
- <if test="XINGBIE != null">XINGBIE = #{XINGBIE},</if>
- <if test="GDDHHM != null">GDDHHM = #{GDDHHM},</if>
- <if test="SJHM != null">SJHM = #{SJHM},</if>
- <if test="ZJLX != null">ZJLX = #{ZJLX},</if>
- <if test="ZJHM != null">ZJHM = #{ZJHM},</if>
- <if test="CSNY != null">CSNY = #{CSNY},</if>
- <if test="HYZK != null">HYZK = #{HYZK},</if>
- <if test="ZHIYE != null">ZHIYE = #{ZHIYE},</if>
- <if test="ZHICHEN != null">ZHICHEN = #{ZHICHEN},</if>
- <if test="ZHIWU != null">ZHIWU = #{ZHIWU},</if>
- <if test="XUELI != null">XUELI = #{XUELI},</if>
- <if test="YZBM != null">YZBM = #{YZBM},</if>
- <if test="JTZZ != null">JTZZ = #{JTZZ},</if>
- <if test="JTYSR != null">JTYSR = #{JTYSR},</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="selectTgjjGrxxList_select_grxx" parameterMap="TgjjGrxx" resultMap="TgjjGrxxResult">
- <include refid="selectTgjjGrxxVo"/>
- <where>
- <if test="GRZH != null and GRZH != ''">
- or GRZH = #{GRZH}
- </if>
- <if test="XINGMING != null and XINGMING != ''">
- or XINGMING = #{XINGMING}
- </if>
- <if test="ZJHM != null and ZJHM != null">
- or ZJHM = #{ZJHM}
- </if>
- </where>
- </select>
- </mapper>
|