<?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.exception.question.domain.mapper.QuestionDescMapper" > <resultMap id="BaseResultMap" type="com.exception.question.domain.entity.QuestionDesc" > <id column="id" property="id" jdbcType="BIGINT" /> <result column="question_id" property="questionId" jdbcType="BIGINT" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" /> <result column="create_user_id" property="createUserId" jdbcType="BIGINT" /> </resultMap> <resultMap id="ResultMapWithBLOBs" type="com.exception.question.domain.entity.QuestionDescWithBLOBs" extends="BaseResultMap" > <result column="description" property="description" jdbcType="LONGVARCHAR" /> <result column="description_ch" property="descriptionCh" jdbcType="LONGVARCHAR" /> </resultMap> <sql id="Base_Column_List" > id, question_id, create_time, update_time, create_user_id </sql> <sql id="Blob_Column_List" > description, description_ch </sql> <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" > select <include refid="Base_Column_List" /> , <include refid="Blob_Column_List" /> from t_question_desc where id = #{id,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" > delete from t_question_desc where id = #{id,jdbcType=BIGINT} </delete> <insert id="insert" parameterType="com.exception.question.domain.entity.QuestionDescWithBLOBs" > insert into t_question_desc (id, question_id, create_time, update_time, create_user_id, description, description_ch) values (#{id,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR}, #{descriptionCh,jdbcType=LONGVARCHAR}) </insert> <insert id="insertSelective" parameterType="com.exception.question.domain.entity.QuestionDescWithBLOBs" > insert into t_question_desc <trim prefix="(" suffix=")" suffixOverrides="," > <if test="id != null" > id, </if> <if test="questionId != null" > question_id, </if> <if test="createTime != null" > create_time, </if> <if test="updateTime != null" > update_time, </if> <if test="createUserId != null" > create_user_id, </if> <if test="description != null" > description, </if> <if test="descriptionCh != null" > description_ch, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="id != null" > #{id,jdbcType=BIGINT}, </if> <if test="questionId != null" > #{questionId,jdbcType=BIGINT}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null" > #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="createUserId != null" > #{createUserId,jdbcType=BIGINT}, </if> <if test="description != null" > #{description,jdbcType=LONGVARCHAR}, </if> <if test="descriptionCh != null" > #{descriptionCh,jdbcType=LONGVARCHAR}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="com.exception.question.domain.entity.QuestionDescWithBLOBs" > update t_question_desc <set > <if test="questionId != null" > question_id = #{questionId,jdbcType=BIGINT}, </if> <if test="createTime != null" > create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null" > update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="createUserId != null" > create_user_id = #{createUserId,jdbcType=BIGINT}, </if> <if test="description != null" > description = #{description,jdbcType=LONGVARCHAR}, </if> <if test="descriptionCh != null" > description_ch = #{descriptionCh,jdbcType=LONGVARCHAR}, </if> </set> where id = #{id,jdbcType=BIGINT} </update> <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.exception.question.domain.entity.QuestionDescWithBLOBs" > update t_question_desc set question_id = #{questionId,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP}, create_user_id = #{createUserId,jdbcType=BIGINT}, description = #{description,jdbcType=LONGVARCHAR}, description_ch = #{descriptionCh,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=BIGINT} </update> <update id="updateByPrimaryKey" parameterType="com.exception.question.domain.entity.QuestionDesc" > update t_question_desc set question_id = #{questionId,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP}, create_user_id = #{createUserId,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} </update> </mapper>