大唐会议项目
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.
 
 
 
 
 
 

300 lines
12 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.acupuncture.system.persist.mapper.ZytzQmsScaleQuestionOptionMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.ZytzQmsScaleQuestionOption">
<id column="option_id" jdbcType="BIGINT" property="optionId" />
<result column="ques_code" jdbcType="VARCHAR" property="quesCode" />
<result column="option_code" jdbcType="VARCHAR" property="optionCode" />
<result column="option_name" jdbcType="VARCHAR" property="optionName" />
<result column="option_score" jdbcType="DECIMAL" property="optionScore" />
<result column="option_sort" jdbcType="VARCHAR" property="optionSort" />
<result column="del_flag" jdbcType="CHAR" property="delFlag" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</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">
option_id, ques_code, option_code, option_name, option_score, option_sort, del_flag,
create_by, create_time, update_by, update_time
</sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.ZytzQmsScaleQuestionOptionExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from zytz_qms_scale_question_option
<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 zytz_qms_scale_question_option
where option_id = #{optionId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from zytz_qms_scale_question_option
where option_id = #{optionId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.ZytzQmsScaleQuestionOption">
insert into zytz_qms_scale_question_option (option_id, ques_code, option_code,
option_name, option_score, option_sort,
del_flag, create_by, create_time,
update_by, update_time)
values (#{optionId,jdbcType=BIGINT}, #{quesCode,jdbcType=VARCHAR}, #{optionCode,jdbcType=VARCHAR},
#{optionName,jdbcType=VARCHAR}, #{optionScore,jdbcType=DECIMAL}, #{optionSort,jdbcType=VARCHAR},
#{delFlag,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.ZytzQmsScaleQuestionOption">
insert into zytz_qms_scale_question_option
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="optionId != null">
option_id,
</if>
<if test="quesCode != null">
ques_code,
</if>
<if test="optionCode != null">
option_code,
</if>
<if test="optionName != null">
option_name,
</if>
<if test="optionScore != null">
option_score,
</if>
<if test="optionSort != null">
option_sort,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="optionId != null">
#{optionId,jdbcType=BIGINT},
</if>
<if test="quesCode != null">
#{quesCode,jdbcType=VARCHAR},
</if>
<if test="optionCode != null">
#{optionCode,jdbcType=VARCHAR},
</if>
<if test="optionName != null">
#{optionName,jdbcType=VARCHAR},
</if>
<if test="optionScore != null">
#{optionScore,jdbcType=DECIMAL},
</if>
<if test="optionSort != null">
#{optionSort,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=CHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.ZytzQmsScaleQuestionOptionExample" resultType="java.lang.Long">
select count(*) from zytz_qms_scale_question_option
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update zytz_qms_scale_question_option
<set>
<if test="record.optionId != null">
option_id = #{record.optionId,jdbcType=BIGINT},
</if>
<if test="record.quesCode != null">
ques_code = #{record.quesCode,jdbcType=VARCHAR},
</if>
<if test="record.optionCode != null">
option_code = #{record.optionCode,jdbcType=VARCHAR},
</if>
<if test="record.optionName != null">
option_name = #{record.optionName,jdbcType=VARCHAR},
</if>
<if test="record.optionScore != null">
option_score = #{record.optionScore,jdbcType=DECIMAL},
</if>
<if test="record.optionSort != null">
option_sort = #{record.optionSort,jdbcType=VARCHAR},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=CHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update zytz_qms_scale_question_option
set option_id = #{record.optionId,jdbcType=BIGINT},
ques_code = #{record.quesCode,jdbcType=VARCHAR},
option_code = #{record.optionCode,jdbcType=VARCHAR},
option_name = #{record.optionName,jdbcType=VARCHAR},
option_score = #{record.optionScore,jdbcType=DECIMAL},
option_sort = #{record.optionSort,jdbcType=VARCHAR},
del_flag = #{record.delFlag,jdbcType=CHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.ZytzQmsScaleQuestionOption">
update zytz_qms_scale_question_option
<set>
<if test="quesCode != null">
ques_code = #{quesCode,jdbcType=VARCHAR},
</if>
<if test="optionCode != null">
option_code = #{optionCode,jdbcType=VARCHAR},
</if>
<if test="optionName != null">
option_name = #{optionName,jdbcType=VARCHAR},
</if>
<if test="optionScore != null">
option_score = #{optionScore,jdbcType=DECIMAL},
</if>
<if test="optionSort != null">
option_sort = #{optionSort,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=CHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where option_id = #{optionId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.ZytzQmsScaleQuestionOption">
update zytz_qms_scale_question_option
set ques_code = #{quesCode,jdbcType=VARCHAR},
option_code = #{optionCode,jdbcType=VARCHAR},
option_name = #{optionName,jdbcType=VARCHAR},
option_score = #{optionScore,jdbcType=DECIMAL},
option_sort = #{optionSort,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=CHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where option_id = #{optionId,jdbcType=BIGINT}
</update>
</mapper>