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.

433 lines
16 KiB

6 years ago
<?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.ht.persist.mapper.HtQuestionMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtQuestion">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="evaluation_code" jdbcType="VARCHAR" property="evaluationCode" />
<result column="parent_code" jdbcType="VARCHAR" property="parentCode" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="question" jdbcType="VARCHAR" property="question" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="record_type" jdbcType="VARCHAR" property="recordType" />
<result column="record_content" jdbcType="VARCHAR" property="recordContent" />
<result column="relation_code" jdbcType="VARCHAR" property="relationCode" />
<result column="operate_type" jdbcType="TINYINT" property="operateType" />
<result column="recode_starttime" jdbcType="TINYINT" property="recodeStarttime" />
<result column="time_wabei" jdbcType="TINYINT" property="timeWabei" />
<result column="allow_clear" jdbcType="TINYINT" property="allowClear" />
<result column="clear_times" jdbcType="INTEGER" property="clearTimes" />
<result column="timing_length" jdbcType="INTEGER" property="timingLength" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, evaluation_code, parent_code, sort, question, type, record_type, record_content,
relation_code, operate_type, recode_starttime, time_wabei, allow_clear, clear_times,
timing_length, remark, create_time, update_time, is_del
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_ht_question
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_ht_question
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_question
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionExample">
delete from t_ht_question
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtQuestion">
insert into t_ht_question (id, evaluation_code, parent_code,
sort, question, type,
record_type, record_content, relation_code,
operate_type, recode_starttime, time_wabei,
allow_clear, clear_times, timing_length,
remark, create_time, update_time,
is_del)
values (#{id,jdbcType=BIGINT}, #{evaluationCode,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{question,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT},
#{recordType,jdbcType=VARCHAR}, #{recordContent,jdbcType=VARCHAR}, #{relationCode,jdbcType=VARCHAR},
#{operateType,jdbcType=TINYINT}, #{recodeStarttime,jdbcType=TINYINT}, #{timeWabei,jdbcType=TINYINT},
#{allowClear,jdbcType=TINYINT}, #{clearTimes,jdbcType=INTEGER}, #{timingLength,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{isDel,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestion">
insert into t_ht_question
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="evaluationCode != null">
evaluation_code,
</if>
<if test="parentCode != null">
parent_code,
</if>
<if test="sort != null">
sort,
</if>
<if test="question != null">
question,
</if>
<if test="type != null">
type,
</if>
<if test="recordType != null">
record_type,
</if>
<if test="recordContent != null">
record_content,
</if>
<if test="relationCode != null">
relation_code,
</if>
<if test="operateType != null">
operate_type,
</if>
<if test="recodeStarttime != null">
recode_starttime,
</if>
<if test="timeWabei != null">
time_wabei,
</if>
<if test="allowClear != null">
allow_clear,
</if>
<if test="clearTimes != null">
clear_times,
</if>
<if test="timingLength != null">
timing_length,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDel != null">
is_del,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="evaluationCode != null">
#{evaluationCode,jdbcType=VARCHAR},
</if>
<if test="parentCode != null">
#{parentCode,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="question != null">
#{question,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="recordType != null">
#{recordType,jdbcType=VARCHAR},
</if>
<if test="recordContent != null">
#{recordContent,jdbcType=VARCHAR},
</if>
<if test="relationCode != null">
#{relationCode,jdbcType=VARCHAR},
</if>
<if test="operateType != null">
#{operateType,jdbcType=TINYINT},
</if>
<if test="recodeStarttime != null">
#{recodeStarttime,jdbcType=TINYINT},
</if>
<if test="timeWabei != null">
#{timeWabei,jdbcType=TINYINT},
</if>
<if test="allowClear != null">
#{allowClear,jdbcType=TINYINT},
</if>
<if test="clearTimes != null">
#{clearTimes,jdbcType=INTEGER},
</if>
<if test="timingLength != null">
#{timingLength,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
#{isDel,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionExample" resultType="java.lang.Long">
select count(*) from t_ht_question
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_ht_question
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.evaluationCode != null">
evaluation_code = #{record.evaluationCode,jdbcType=VARCHAR},
</if>
<if test="record.parentCode != null">
parent_code = #{record.parentCode,jdbcType=VARCHAR},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.question != null">
question = #{record.question,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.recordType != null">
record_type = #{record.recordType,jdbcType=VARCHAR},
</if>
<if test="record.recordContent != null">
record_content = #{record.recordContent,jdbcType=VARCHAR},
</if>
<if test="record.relationCode != null">
relation_code = #{record.relationCode,jdbcType=VARCHAR},
</if>
<if test="record.operateType != null">
operate_type = #{record.operateType,jdbcType=TINYINT},
</if>
<if test="record.recodeStarttime != null">
recode_starttime = #{record.recodeStarttime,jdbcType=TINYINT},
</if>
<if test="record.timeWabei != null">
time_wabei = #{record.timeWabei,jdbcType=TINYINT},
</if>
<if test="record.allowClear != null">
allow_clear = #{record.allowClear,jdbcType=TINYINT},
</if>
<if test="record.clearTimes != null">
clear_times = #{record.clearTimes,jdbcType=INTEGER},
</if>
<if test="record.timingLength != null">
timing_length = #{record.timingLength,jdbcType=INTEGER},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_ht_question
set id = #{record.id,jdbcType=BIGINT},
evaluation_code = #{record.evaluationCode,jdbcType=VARCHAR},
parent_code = #{record.parentCode,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER},
question = #{record.question,jdbcType=VARCHAR},
type = #{record.type,jdbcType=TINYINT},
record_type = #{record.recordType,jdbcType=VARCHAR},
record_content = #{record.recordContent,jdbcType=VARCHAR},
relation_code = #{record.relationCode,jdbcType=VARCHAR},
operate_type = #{record.operateType,jdbcType=TINYINT},
recode_starttime = #{record.recodeStarttime,jdbcType=TINYINT},
time_wabei = #{record.timeWabei,jdbcType=TINYINT},
allow_clear = #{record.allowClear,jdbcType=TINYINT},
clear_times = #{record.clearTimes,jdbcType=INTEGER},
timing_length = #{record.timingLength,jdbcType=INTEGER},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtQuestion">
update t_ht_question
<set>
<if test="evaluationCode != null">
evaluation_code = #{evaluationCode,jdbcType=VARCHAR},
</if>
<if test="parentCode != null">
parent_code = #{parentCode,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="question != null">
question = #{question,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="recordType != null">
record_type = #{recordType,jdbcType=VARCHAR},
</if>
<if test="recordContent != null">
record_content = #{recordContent,jdbcType=VARCHAR},
</if>
<if test="relationCode != null">
relation_code = #{relationCode,jdbcType=VARCHAR},
</if>
<if test="operateType != null">
operate_type = #{operateType,jdbcType=TINYINT},
</if>
<if test="recodeStarttime != null">
recode_starttime = #{recodeStarttime,jdbcType=TINYINT},
</if>
<if test="timeWabei != null">
time_wabei = #{timeWabei,jdbcType=TINYINT},
</if>
<if test="allowClear != null">
allow_clear = #{allowClear,jdbcType=TINYINT},
</if>
<if test="clearTimes != null">
clear_times = #{clearTimes,jdbcType=INTEGER},
</if>
<if test="timingLength != null">
timing_length = #{timingLength,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtQuestion">
update t_ht_question
set evaluation_code = #{evaluationCode,jdbcType=VARCHAR},
parent_code = #{parentCode,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
question = #{question,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
record_type = #{recordType,jdbcType=VARCHAR},
record_content = #{recordContent,jdbcType=VARCHAR},
relation_code = #{relationCode,jdbcType=VARCHAR},
operate_type = #{operateType,jdbcType=TINYINT},
recode_starttime = #{recodeStarttime,jdbcType=TINYINT},
time_wabei = #{timeWabei,jdbcType=TINYINT},
allow_clear = #{allowClear,jdbcType=TINYINT},
clear_times = #{clearTimes,jdbcType=INTEGER},
timing_length = #{timingLength,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>