<?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.MctMapper"> <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Mct"> <result property="inr" column="inr" jdbcType="VARCHAR"/> <result property="narhis" column="narhis" jdbcType="VARCHAR"/> <result property="fldmodblk" column="fldmodblk" jdbcType="VARCHAR"/> <result property="ver" column="ver" jdbcType="VARCHAR"/> <result property="contag72" column="contag72" jdbcType="VARCHAR"/> <result property="contag79" column="contag79" jdbcType="VARCHAR"/> </resultMap> <sql id="Base_Column_List"> inr,narhis,fldmodblk,ver,contag72,contag79 </sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from mct where inr = #{inr,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey"> delete from mct where inr = #{inr,jdbcType=VARCHAR} </delete> <insert id="insert"> insert into mct (<include refid="Base_Column_List" />) <trim prefix="values (" suffix=")" suffixOverrides=","> #{inr,jdbcType=VARCHAR}, #{narhis,jdbcType=VARCHAR}, #{fldmodblk,jdbcType=VARCHAR}, #{ver,jdbcType=VARCHAR}, #{contag72,jdbcType=VARCHAR}, #{contag79,jdbcType=VARCHAR}, </trim> </insert> <insert id="insertSelective"> insert into mct <trim prefix="(" suffix=")" suffixOverrides=","> <if test="inr != null">inr,</if> <if test="narhis != null">narhis,</if> <if test="fldmodblk != null">fldmodblk,</if> <if test="ver != null">ver,</if> <if test="contag72 != null">contag72,</if> <if test="contag79 != null">contag79,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if> <if test="narhis != null">#{narhis,jdbcType=VARCHAR}, </if> <if test="fldmodblk != null">#{fldmodblk,jdbcType=VARCHAR}, </if> <if test="ver != null">#{ver,jdbcType=VARCHAR}, </if> <if test="contag72 != null">#{contag72,jdbcType=VARCHAR}, </if> <if test="contag79 != null">#{contag79,jdbcType=VARCHAR}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective"> update mct <set> <if test="narhis != null">narhis = #{narhis,jdbcType=VARCHAR},</if> <if test="fldmodblk != null">fldmodblk = #{fldmodblk,jdbcType=VARCHAR},</if> <if test="ver != null">ver = #{ver,jdbcType=VARCHAR},</if> <if test="contag72 != null">contag72 = #{contag72,jdbcType=VARCHAR},</if> <if test="contag79 != null">contag79 = #{contag79,jdbcType=VARCHAR},</if> </set> where inr = #{inr,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey"> update mct <set> narhis = #{narhis,jdbcType=VARCHAR}, fldmodblk = #{fldmodblk,jdbcType=VARCHAR}, ver = #{ver,jdbcType=VARCHAR}, contag72 = #{contag72,jdbcType=VARCHAR}, contag79 = #{contag79,jdbcType=VARCHAR}, </set> where inr = #{inr,jdbcType=VARCHAR} </update> </mapper>