123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?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.TgjjHmdxxMapper2">
- <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.TgjjHmdxx" id="TgjjHmdxxResult">
- </resultMap>
- <parameterMap id="TgjjHmdxx" type="com.sooka.model.bo.TgjjHmdxx"></parameterMap>
- <sql id="selectTgjjHmdxxVo">
- select ID, BLJLID, XINGMING, ZJLX, ZJHM, BLXXFL, BLXXDJ, BLXXZT, START_TIME, END_TIME, SYMS, ZXBH, LXYQQS, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_hmdxx
- </sql>
- <select id="selectTgjjHmdxxList" parameterMap="TgjjHmdxx" resultMap="TgjjHmdxxResult">
- <include refid="selectTgjjHmdxxVo"/>
- <where>
- <if test="BLJLID != null and BLJLID != ''"> and BLJLID = #{BLJLID}</if>
- <if test="XINGMING != null and XINGMING != ''"> and XINGMING = #{XINGMING}</if>
- <if test="ZJLX != null and ZJLX != ''"> and ZJLX = #{ZJLX}</if>
- <if test="ZJHM != null and ZJHM != ''"> and ZJHM = #{ZJHM}</if>
- <if test="BLXXFL != null and BLXXFL != ''"> and BLXXFL = #{BLXXFL}</if>
- <if test="BLXXDJ != null and BLXXDJ != ''"> and BLXXDJ = #{BLXXDJ}</if>
- <if test="BLXXZT != null and BLXXZT != ''"> and BLXXZT = #{BLXXZT}</if>
- <if test="startTime != null "> and START_TIME = #{startTime}</if>
- <if test="endTime != null "> and END_TIME = #{endTime}</if>
- <if test="SYMS != null and SYMS != ''"> and SYMS = #{SYMS}</if>
- <if test="ZXBH != null and ZXBH != ''"> and ZXBH = #{ZXBH}</if>
- <if test="LXYQQS != null "> and LXYQQS = #{LXYQQS}</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="selectTgjjHmdxxById" parameterType="Long" resultMap="TgjjHmdxxResult">
- <include refid="selectTgjjHmdxxVo"/>
- where ID = #{ID}
- </select>
- <insert id="insertTgjjHmdxx" parameterMap="TgjjHmdxx" useGeneratedKeys="true" keyProperty="ID">
- insert into tgjj_hmdxx
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <include refid="global_name"></include>
- <if test="BLJLID != null">BLJLID,</if>
- <if test="XINGMING != null">XINGMING,</if>
- <if test="ZJLX != null">ZJLX,</if>
- <if test="ZJHM != null">ZJHM,</if>
- <if test="BLXXFL != null">BLXXFL,</if>
- <if test="BLXXDJ != null">BLXXDJ,</if>
- <if test="BLXXZT != null">BLXXZT,</if>
- <if test="startTime != null">START_TIME,</if>
- <if test="endTime != null">END_TIME,</if>
- <if test="SYMS != null">SYMS,</if>
- <if test="ZXBH != null">ZXBH,</if>
- <if test="LXYQQS != null">LXYQQS,</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="BLJLID != null">#{BLJLID},</if>
- <if test="XINGMING != null">#{XINGMING},</if>
- <if test="ZJLX != null">#{ZJLX},</if>
- <if test="ZJHM != null">#{ZJHM},</if>
- <if test="BLXXFL != null">#{BLXXFL},</if>
- <if test="BLXXDJ != null">#{BLXXDJ},</if>
- <if test="BLXXZT != null">#{BLXXZT},</if>
- <if test="startTime != null">#{startTime},</if>
- <if test="endTime != null">#{endTime},</if>
- <if test="SYMS != null">#{SYMS},</if>
- <if test="ZXBH != null">#{ZXBH},</if>
- <if test="LXYQQS != null">#{LXYQQS},</if>
- <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
- <if test="CLLX != null">#{CLLX},</if>
- </trim>
- </insert>
- <update id="updateTgjjHmdxx" parameterMap="TgjjHmdxx">
- update tgjj_hmdxx
- <trim prefix="SET" suffixOverrides=",">
- <include refid="update_sql"></include>
- <if test="BLJLID != null">BLJLID = #{BLJLID},</if>
- <if test="XINGMING != null">XINGMING = #{XINGMING},</if>
- <if test="ZJLX != null">ZJLX = #{ZJLX},</if>
- <if test="ZJHM != null">ZJHM = #{ZJHM},</if>
- <if test="BLXXFL != null">BLXXFL = #{BLXXFL},</if>
- <if test="BLXXDJ != null">BLXXDJ = #{BLXXDJ},</if>
- <if test="BLXXZT != null">BLXXZT = #{BLXXZT},</if>
- <if test="startTime != null">START_TIME = #{startTime},</if>
- <if test="endTime != null">END_TIME = #{endTime},</if>
- <if test="SYMS != null">SYMS = #{SYMS},</if>
- <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
- <if test="LXYQQS != null">LXYQQS = #{LXYQQS},</if>
- <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
- <if test="CLLX != null">CLLX = #{CLLX},</if>
- </trim>
- where ID = #{ID}
- </update>
- <select id="selectTgjjHmdxxList_select_hmdxx" parameterMap="TgjjHmdxx" resultMap="TgjjHmdxxResult">
- <include refid="selectTgjjHmdxxVo"/>
- <where>
- <if test="XINGMING != null and XINGMING != ''">
- and XINGMING = #{XINGMING}
- </if>
- </where>
- </select>
- </mapper>
|