You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.8 KiB

<?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.ccsens.tcm.persist.dao.QuestionDao">
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.Question">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="question" jdbcType="VARCHAR" property="question" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="units" jdbcType="VARCHAR" property="units" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="relevance_option_id" jdbcType="BIGINT" property="relevanceOptionId" />
<result column="search_criteria" jdbcType="TINYINT" property="searchCriteria" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<insert id="insertBatch">
replace into t_question (id, question, code,
sort, units, type,
relevance_option_id, search_criteria, remark)
values
<foreach collection="list" item="question" separator=",">
(#{question.id,jdbcType=BIGINT}, #{question.question,jdbcType=VARCHAR}, #{question.code,jdbcType=VARCHAR},
#{question.sort,jdbcType=INTEGER}, #{question.units,jdbcType=VARCHAR}, #{question.type,jdbcType=TINYINT},
#{question.relevanceOptionId,jdbcType=BIGINT}, #{question.searchCriteria,jdbcType=TINYINT}, #{question.remark,jdbcType=VARCHAR})
</foreach>
</insert>
</mapper>