123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <?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.TgjjBsxxMapper2">
- <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.TgjjBsxx" id="TgjjBsxxResult">
- </resultMap>
- <parameterMap id="TgjjBsxx" type="com.sooka.model.bo.TgjjBsxx"></parameterMap>
- <sql id="selectTgjjBsxxVo">
- select ID, JKHTBH, JKRXM, JKRZJLX, JKRZJH, SFST, SFSB, DKLX, YDFKRQ, YDDQRQ, DKKHRQ, SCHKRQ, DKZT, DKJQRQ, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_bsxx
- </sql>
- <select id="selectTgjjBsxxList" parameterMap="TgjjBsxx" resultMap="TgjjBsxxResult">
- <include refid="selectTgjjBsxxVo"/>
- <where>
- <if test="JKHTBH != null and JKHTBH != ''"> and JKHTBH = #{JKHTBH}</if>
- <if test="JKRXM != null and JKRXM != ''"> and JKRXM = #{JKRXM}</if>
- <if test="JKRZJLX != null and JKRZJLX != ''"> and JKRZJLX = #{JKRZJLX}</if>
- <if test="JKRZJH != null and JKRZJH != ''"> and JKRZJH = #{JKRZJH}</if>
- <if test="SFST != null and SFST != ''"> and SFST = #{SFST}</if>
- <if test="SFSB != null and SFSB != ''"> and SFSB = #{SFSB}</if>
- <if test="DKLX != null and DKLX != ''"> and DKLX = #{DKLX}</if>
- <if test="YDFKRQ != null "> and YDFKRQ = #{YDFKRQ}</if>
- <if test="YDDQRQ != null "> and YDDQRQ = #{YDDQRQ}</if>
- <if test="DKKHRQ != null "> and DKKHRQ = #{DKKHRQ}</if>
- <if test="SCHKRQ != null "> and SCHKRQ = #{SCHKRQ}</if>
- <if test="DKZT != null and DKZT != ''"> and DKZT = #{DKZT}</if>
- <if test="DKJQRQ != null "> and DKJQRQ = #{DKJQRQ}</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>
- </where>
- </select>
- <select id="selectTgjjBsxxById" parameterType="Long" resultMap="TgjjBsxxResult">
- <include refid="selectTgjjBsxxVo"/>
- where ID = #{ID}
- </select>
- <insert id="insertTgjjBsxx" parameterMap="TgjjBsxx" useGeneratedKeys="true" keyProperty="ID">
- insert into tgjj_bsxx
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <include refid="global_name"></include>
- <if test="JKHTBH != null">JKHTBH,</if>
- <if test="JKRXM != null">JKRXM,</if>
- <if test="JKRZJLX != null">JKRZJLX,</if>
- <if test="JKRZJH != null">JKRZJH,</if>
- <if test="SFST != null">SFST,</if>
- <if test="SFSB != null">SFSB,</if>
- <if test="DKLX != null">DKLX,</if>
- <if test="YDFKRQ != null">YDFKRQ,</if>
- <if test="YDDQRQ != null">YDDQRQ,</if>
- <if test="DKKHRQ != null">DKKHRQ,</if>
- <if test="SCHKRQ != null">SCHKRQ,</if>
- <if test="DKZT != null">DKZT,</if>
- <if test="DKJQRQ != null">DKJQRQ,</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="JKHTBH != null">#{JKHTBH},</if>
- <if test="JKRXM != null">#{JKRXM},</if>
- <if test="JKRZJLX != null">#{JKRZJLX},</if>
- <if test="JKRZJH != null">#{JKRZJH},</if>
- <if test="SFST != null">#{SFST},</if>
- <if test="SFSB != null">#{SFSB},</if>
- <if test="DKLX != null">#{DKLX},</if>
- <if test="YDFKRQ != null">#{YDFKRQ},</if>
- <if test="YDDQRQ != null">#{YDDQRQ},</if>
- <if test="DKKHRQ != null">#{DKKHRQ},</if>
- <if test="SCHKRQ != null">#{SCHKRQ},</if>
- <if test="DKZT != null">#{DKZT},</if>
- <if test="DKJQRQ != null">#{DKJQRQ},</if>
- <if test="ZXBH != null">#{ZXBH},</if>
- <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
- <if test="CLLX != null">#{CLLX},</if>
- </trim>
- </insert>
- <update id="updateTgjjBsxx" parameterMap="TgjjBsxx">
- update tgjj_bsxx
- <trim prefix="SET" suffixOverrides=",">
- <include refid="update_sql"></include>
- <if test="JKHTBH != null">JKHTBH = #{JKHTBH},</if>
- <if test="JKRXM != null">JKRXM = #{JKRXM},</if>
- <if test="JKRZJLX != null">JKRZJLX = #{JKRZJLX},</if>
- <if test="JKRZJH != null">JKRZJH = #{JKRZJH},</if>
- <if test="SFST != null">SFST = #{SFST},</if>
- <if test="SFSB != null">SFSB = #{SFSB},</if>
- <if test="DKLX != null">DKLX = #{DKLX},</if>
- <if test="YDFKRQ != null">YDFKRQ = #{YDFKRQ},</if>
- <if test="YDDQRQ != null">YDDQRQ = #{YDDQRQ},</if>
- <if test="DKKHRQ != null">DKKHRQ = #{DKKHRQ},</if>
- <if test="SCHKRQ != null">SCHKRQ = #{SCHKRQ},</if>
- <if test="DKZT != null">DKZT = #{DKZT},</if>
- <if test="DKJQRQ != null">DKJQRQ = #{DKJQRQ},</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="selectTgjjBsxxList_select_bsxx" resultMap="TgjjBsxxResult" parameterMap="TgjjBsxx">
- <include refid="selectTgjjBsxxVo"/>
- <where>
- <if test="JKRXM != null and JKRXM != ''">
- and JKRXM = #{JKRXM}
- </if>
- <if test="JKRZJH != null and JKRZJH != ''">
- and JKRZJH = #{JKRZJH}
- </if>
- </where>
- </select>
- </mapper>
|