<?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.brilliance.isc.mda.dao.GctMapper"> <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Gct"> <result property="inr" column="inr" jdbcType="VARCHAR"/> <result property="ver" column="ver" jdbcType="VARCHAR"/> <result property="fldmodblk" column="fldmodblk" jdbcType="VARCHAR"/> <result property="contag72" column="contag72" jdbcType="VARCHAR"/> <result property="contag79" column="contag79" jdbcType="VARCHAR"/> <result property="addamtinf" column="addamtinf" jdbcType="VARCHAR"/> <result property="disdoc" column="disdoc" jdbcType="VARCHAR"/> <result property="presentdet" column="presentdet" jdbcType="VARCHAR"/> </resultMap> <sql id="Base_Column_List"> inr,ver,fldmodblk,contag72,contag79,addamtinf,disdoc,presentdet </sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from gct where inr = #{inr,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey"> delete from gct where inr = #{inr,jdbcType=VARCHAR} </delete> <insert id="insert"> insert into gct (<include refid="Base_Column_List" />) <trim prefix="values (" suffix=")" suffixOverrides=","> #{inr,jdbcType=VARCHAR}, #{ver,jdbcType=VARCHAR}, #{fldmodblk,jdbcType=VARCHAR}, #{contag72,jdbcType=VARCHAR}, #{contag79,jdbcType=VARCHAR}, #{addamtinf,jdbcType=VARCHAR}, #{disdoc,jdbcType=VARCHAR}, #{presentdet,jdbcType=VARCHAR}, </trim> </insert> <insert id="insertSelective"> insert into gct <trim prefix="(" suffix=")" suffixOverrides=","> <if test="inr != null">inr,</if> <if test="ver != null">ver,</if> <if test="fldmodblk != null">fldmodblk,</if> <if test="contag72 != null">contag72,</if> <if test="contag79 != null">contag79,</if> <if test="addamtinf != null">addamtinf,</if> <if test="disdoc != null">disdoc,</if> <if test="presentdet != null">presentdet,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if> <if test="ver != null">#{ver,jdbcType=VARCHAR}, </if> <if test="fldmodblk != null">#{fldmodblk,jdbcType=VARCHAR}, </if> <if test="contag72 != null">#{contag72,jdbcType=VARCHAR}, </if> <if test="contag79 != null">#{contag79,jdbcType=VARCHAR}, </if> <if test="addamtinf != null">#{addamtinf,jdbcType=VARCHAR}, </if> <if test="disdoc != null">#{disdoc,jdbcType=VARCHAR}, </if> <if test="presentdet != null">#{presentdet,jdbcType=VARCHAR}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective"> update gct <set> <if test="ver != null">ver = #{ver,jdbcType=VARCHAR},</if> <if test="fldmodblk != null">fldmodblk = #{fldmodblk,jdbcType=VARCHAR},</if> <if test="contag72 != null">contag72 = #{contag72,jdbcType=VARCHAR},</if> <if test="contag79 != null">contag79 = #{contag79,jdbcType=VARCHAR},</if> <if test="addamtinf != null">addamtinf = #{addamtinf,jdbcType=VARCHAR},</if> <if test="disdoc != null">disdoc = #{disdoc,jdbcType=VARCHAR},</if> <if test="presentdet != null">presentdet = #{presentdet,jdbcType=VARCHAR},</if> </set> where inr = #{inr,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey"> update gct <set> ver = #{ver,jdbcType=VARCHAR}, fldmodblk = #{fldmodblk,jdbcType=VARCHAR}, contag72 = #{contag72,jdbcType=VARCHAR}, contag79 = #{contag79,jdbcType=VARCHAR}, addamtinf = #{addamtinf,jdbcType=VARCHAR}, disdoc = #{disdoc,jdbcType=VARCHAR}, presentdet = #{presentdet,jdbcType=VARCHAR}, </set> where inr = #{inr,jdbcType=VARCHAR} </update> <delete id="deleteByIds"> delete from act where inr in <foreach item="item" index="index" collection="collection" open="(" separator="," close=")"> #{item} </foreach> </delete> <update id="dyncUpdate"> update gct <set> <if test="module.ver != null">ver = #{module.ver,jdbcType=VARCHAR},</if> <if test="module.fldmodblk != null">fldmodblk = #{module.fldmodblk,jdbcType=VARCHAR},</if> <if test="module.contag72 != null">contag72 = #{module.contag72,jdbcType=VARCHAR},</if> <if test="module.contag79 != null">contag79 = #{module.contag79,jdbcType=VARCHAR},</if> <if test="module.addamtinf != null">addamtinf = #{module.addamtinf,jdbcType=VARCHAR},</if> <if test="module.disdoc != null">disdoc = #{module.disdoc,jdbcType=VARCHAR},</if> <if test="module.presentdet != null">presentdet = #{module.presentdet,jdbcType=VARCHAR},</if> </set> ${conditions} </update> <delete id="dyncDelete"> ${sql} </delete> <select id="dyncRead" resultMap="BaseResultMap"> ${sql} </select> </mapper>