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.
291 lines
10 KiB
291 lines
10 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.ht.persist.mapper.HtQuestionShowMapper">
|
|
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtQuestionShow">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="question_id" jdbcType="BIGINT" property="questionId" />
|
|
<result column="show_type" jdbcType="TINYINT" property="showType" />
|
|
<result column="show_node" jdbcType="TINYINT" property="showNode" />
|
|
<result column="param" jdbcType="VARCHAR" property="param" />
|
|
<result column="sort" jdbcType="TINYINT" property="sort" />
|
|
<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, question_id, show_type, show_node, param, sort, remark, create_time, update_time,
|
|
is_del
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionShowExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from t_ht_question_show
|
|
<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_show
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from t_ht_question_show
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionShowExample">
|
|
delete from t_ht_question_show
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtQuestionShow">
|
|
insert into t_ht_question_show (id, question_id, show_type,
|
|
show_node, param, sort,
|
|
remark, create_time, update_time,
|
|
is_del)
|
|
values (#{id,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, #{showType,jdbcType=TINYINT},
|
|
#{showNode,jdbcType=TINYINT}, #{param,jdbcType=VARCHAR}, #{sort,jdbcType=TINYINT},
|
|
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
|
#{isDel,jdbcType=TINYINT})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestionShow">
|
|
insert into t_ht_question_show
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="questionId != null">
|
|
question_id,
|
|
</if>
|
|
<if test="showType != null">
|
|
show_type,
|
|
</if>
|
|
<if test="showNode != null">
|
|
show_node,
|
|
</if>
|
|
<if test="param != null">
|
|
param,
|
|
</if>
|
|
<if test="sort != null">
|
|
sort,
|
|
</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="questionId != null">
|
|
#{questionId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="showType != null">
|
|
#{showType,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="showNode != null">
|
|
#{showNode,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="param != null">
|
|
#{param,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sort != null">
|
|
#{sort,jdbcType=TINYINT},
|
|
</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.HtQuestionShowExample" resultType="java.lang.Long">
|
|
select count(*) from t_ht_question_show
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update t_ht_question_show
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.questionId != null">
|
|
question_id = #{record.questionId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.showType != null">
|
|
show_type = #{record.showType,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.showNode != null">
|
|
show_node = #{record.showNode,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.param != null">
|
|
param = #{record.param,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sort != null">
|
|
sort = #{record.sort,jdbcType=TINYINT},
|
|
</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_show
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
question_id = #{record.questionId,jdbcType=BIGINT},
|
|
show_type = #{record.showType,jdbcType=TINYINT},
|
|
show_node = #{record.showNode,jdbcType=TINYINT},
|
|
param = #{record.param,jdbcType=VARCHAR},
|
|
sort = #{record.sort,jdbcType=TINYINT},
|
|
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.HtQuestionShow">
|
|
update t_ht_question_show
|
|
<set>
|
|
<if test="questionId != null">
|
|
question_id = #{questionId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="showType != null">
|
|
show_type = #{showType,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="showNode != null">
|
|
show_node = #{showNode,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="param != null">
|
|
param = #{param,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sort != null">
|
|
sort = #{sort,jdbcType=TINYINT},
|
|
</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.HtQuestionShow">
|
|
update t_ht_question_show
|
|
set question_id = #{questionId,jdbcType=BIGINT},
|
|
show_type = #{showType,jdbcType=TINYINT},
|
|
show_node = #{showNode,jdbcType=TINYINT},
|
|
param = #{param,jdbcType=VARCHAR},
|
|
sort = #{sort,jdbcType=TINYINT},
|
|
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>
|