IssueAnswerMapper.xml 2 KB
<?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.diligrp.etrade.admin.dao.IssueAnswerMapper">
  <resultMap id="BaseResultMap" type="com.diligrp.etrade.admin.model.IssueAnswer">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="answer" jdbcType="VARCHAR" property="answer" />
  </resultMap>
  <sql id="Base_Column_List">
    id, answer
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from issue_answer
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from issue_answer
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.diligrp.etrade.admin.model.IssueAnswer" useGeneratedKeys="true">
    insert into issue_answer (answer)
    values (#{answer,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.diligrp.etrade.admin.model.IssueAnswer" useGeneratedKeys="true">
    insert into issue_answer
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="answer != null">
        answer,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="answer != null">
        #{answer,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.diligrp.etrade.admin.model.IssueAnswer">
    update issue_answer
    <set>
      <if test="answer != null">
        answer = #{answer,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.diligrp.etrade.admin.model.IssueAnswer">
    update issue_answer
    set answer = #{answer,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>