<?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.FctMapper"> <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Fct"> <result property="inr" column="inr" jdbcType="VARCHAR"/> <result property="apladrblk" column="apladrblk" jdbcType="VARCHAR"/> <result property="narhis" column="narhis" jdbcType="VARCHAR"/> <result property="fldmodblk" column="fldmodblk" jdbcType="VARCHAR"/> </resultMap> <sql id="Base_Column_List"> inr,apladrblk,narhis,fldmodblk </sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap"> select <include refid="Base_Column_List"/> from fct where inr = #{inr,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey"> delete from fct where inr = #{inr,jdbcType=VARCHAR} </delete> <insert id="insert"> insert into fct (<include refid="Base_Column_List"/>) <trim prefix="values (" suffix=")" suffixOverrides=","> #{inr,jdbcType=VARCHAR}, #{apladrblk,jdbcType=VARCHAR}, #{narhis,jdbcType=VARCHAR}, #{fldmodblk,jdbcType=VARCHAR}, </trim> </insert> <insert id="insertSelective"> insert into fct <trim prefix="(" suffix=")" suffixOverrides=","> <if test="inr != null">inr,</if> <if test="apladrblk != null">apladrblk,</if> <if test="narhis != null">narhis,</if> <if test="fldmodblk != null">fldmodblk,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="inr != null">#{inr,jdbcType=VARCHAR},</if> <if test="apladrblk != null">#{apladrblk,jdbcType=VARCHAR},</if> <if test="narhis != null">#{narhis,jdbcType=VARCHAR},</if> <if test="fldmodblk != null">#{fldmodblk,jdbcType=VARCHAR},</if> </trim> </insert> <update id="updateByPrimaryKeySelective"> update fct <set> <if test="apladrblk != null">apladrblk = #{apladrblk,jdbcType=VARCHAR},</if> <if test="narhis != null">narhis = #{narhis,jdbcType=VARCHAR},</if> <if test="fldmodblk != null">fldmodblk = #{fldmodblk,jdbcType=VARCHAR},</if> </set> where inr = #{inr,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey"> update fct <set> apladrblk = #{apladrblk,jdbcType=VARCHAR}, narhis = #{narhis,jdbcType=VARCHAR}, fldmodblk = #{fldmodblk,jdbcType=VARCHAR}, </set> where inr = #{inr,jdbcType=VARCHAR} </update> <delete id="deleteByIds"> delete from fct where inr in <foreach item="item" index="index" collection="collection" open="(" separator="," close=")"> #{item} </foreach> </delete> </mapper>