123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <?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.TgjjDwzhxxMapper2">
- <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.TgjjDwzhxx" id="TgjjDwzhxxResult">
- </resultMap>
- <parameterMap id="TgjjDwzhxx" type="com.sooka.model.bo.TgjjDwzhxx"></parameterMap>
- <sql id="selectTgjjDwzhxxVo">
- select ID, DWZH, DWJCBL, GRJCBL, DWJCRS, DWFCRS, DWZHYE, DWXHRQ, DWXHYY, DWZHZT, JZNY, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_dwzhxx
- </sql>
- <select id="selectTgjjDwzhxxList" parameterMap="TgjjDwzhxx" resultMap="TgjjDwzhxxResult">
- <include refid="selectTgjjDwzhxxVo"/>
- <where>
- <if test="DWZH != null and DWZH != ''"> and DWZH = #{DWZH}</if>
- <if test="DWJCBL != null "> and DWJCBL = #{DWJCBL}</if>
- <if test="GRJCBL != null "> and GRJCBL = #{GRJCBL}</if>
- <if test="DWJCRS != null "> and DWJCRS = #{DWJCRS}</if>
- <if test="DWFCRS != null "> and DWFCRS = #{DWFCRS}</if>
- <if test="DWZHYE != null "> and DWZHYE = #{DWZHYE}</if>
- <if test="DWXHRQ != null "> and DWXHRQ = #{DWXHRQ}</if>
- <if test="DWXHYY != null and DWXHYY != ''"> and DWXHYY = #{DWXHYY}</if>
- <if test="DWZHZT != null and DWZHZT != ''"> and DWZHZT = #{DWZHZT}</if>
- <if test="JZNY != null and JZNY != ''"> and JZNY = #{JZNY}</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="selectTgjjDwzhxxById" parameterType="Long" resultMap="TgjjDwzhxxResult">
- <include refid="selectTgjjDwzhxxVo"/>
- where ID = #{ID}
- </select>
- <insert id="insertTgjjDwzhxx" parameterMap="TgjjDwzhxx" useGeneratedKeys="true" keyProperty="ID">
- insert into tgjj_dwzhxx
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <include refid="global_name"></include>
- <if test="DWZH != null">DWZH,</if>
- <if test="DWJCBL != null">DWJCBL,</if>
- <if test="GRJCBL != null">GRJCBL,</if>
- <if test="DWJCRS != null">DWJCRS,</if>
- <if test="DWFCRS != null">DWFCRS,</if>
- <if test="DWZHYE != null">DWZHYE,</if>
- <if test="DWXHRQ != null">DWXHRQ,</if>
- <if test="DWXHYY != null">DWXHYY,</if>
- <if test="DWZHZT != null">DWZHZT,</if>
- <if test="JZNY != null">JZNY,</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="DWZH != null">#{DWZH},</if>
- <if test="DWJCBL != null">#{DWJCBL},</if>
- <if test="GRJCBL != null">#{GRJCBL},</if>
- <if test="DWJCRS != null">#{DWJCRS},</if>
- <if test="DWFCRS != null">#{DWFCRS},</if>
- <if test="DWZHYE != null">#{DWZHYE},</if>
- <if test="DWXHRQ != null">#{DWXHRQ},</if>
- <if test="DWXHYY != null">#{DWXHYY},</if>
- <if test="DWZHZT != null">#{DWZHZT},</if>
- <if test="JZNY != null">#{JZNY},</if>
- <if test="ZXBH != null">#{ZXBH},</if>
- <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
- <if test="CLLX != null">#{CLLX},</if>
- </trim>
- </insert>
- <update id="updateTgjjDwzhxx" parameterMap="TgjjDwzhxx">
- update tgjj_dwzhxx
- <trim prefix="SET" suffixOverrides=",">
- <include refid="update_sql"></include>
- <if test="DWZH != null">DWZH = #{DWZH},</if>
- <if test="DWJCBL != null">DWJCBL = #{DWJCBL},</if>
- <if test="GRJCBL != null">GRJCBL = #{GRJCBL},</if>
- <if test="DWJCRS != null">DWJCRS = #{DWJCRS},</if>
- <if test="DWFCRS != null">DWFCRS = #{DWFCRS},</if>
- <if test="DWZHYE != null">DWZHYE = #{DWZHYE},</if>
- <if test="DWXHRQ != null">DWXHRQ = #{DWXHRQ},</if>
- <if test="DWXHYY != null">DWXHYY = #{DWXHYY},</if>
- <if test="DWZHZT != null">DWZHZT = #{DWZHZT},</if>
- <if test="JZNY != null">JZNY = #{JZNY},</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="selectTgjjDwzhxxList_select_dwzhxx" parameterMap="TgjjDwzhxx" resultMap="TgjjDwzhxxResult">
- <include refid="selectTgjjDwzhxxVo"/>
- <where>
- <if test="DWZH != null and DWZH != ''">
- and DWZH = #{DWZH}
- </if>
- </where>
- </select>
- </mapper>
|