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
11 KiB
300 lines
11 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.ScrScreeningMapper">
|
|
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.ScrScreening">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="questionnaire_name" jdbcType="VARCHAR" property="questionnaireName" />
|
|
<result column="start_time" jdbcType="BIGINT" property="startTime" />
|
|
<result column="end_time" jdbcType="BIGINT" property="endTime" />
|
|
<result column="type" jdbcType="TINYINT" property="type" />
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
|
|
<result column="write_start_time" jdbcType="BIGINT" property="writeStartTime" />
|
|
<result column="write_end_time" jdbcType="BIGINT" property="writeEndTime" />
|
|
<result column="data_scope" jdbcType="VARCHAR" property="dataScope" />
|
|
</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, questionnaire_name, start_time, end_time, type, created_at, updated_at, rec_status,
|
|
write_start_time, write_end_time, data_scope
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.ScrScreeningExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from scr_screening
|
|
<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 scr_screening
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from scr_screening
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.acupuncture.system.domain.po.ScrScreening">
|
|
insert into scr_screening (id, questionnaire_name, start_time,
|
|
end_time, type, created_at,
|
|
updated_at, rec_status, write_start_time,
|
|
write_end_time, data_scope)
|
|
values (#{id,jdbcType=BIGINT}, #{questionnaireName,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT},
|
|
#{endTime,jdbcType=BIGINT}, #{type,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
|
|
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{writeStartTime,jdbcType=BIGINT},
|
|
#{writeEndTime,jdbcType=BIGINT}, #{dataScope,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.ScrScreening">
|
|
insert into scr_screening
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="questionnaireName != null">
|
|
questionnaire_name,
|
|
</if>
|
|
<if test="startTime != null">
|
|
start_time,
|
|
</if>
|
|
<if test="endTime != null">
|
|
end_time,
|
|
</if>
|
|
<if test="type != null">
|
|
type,
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at,
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at,
|
|
</if>
|
|
<if test="recStatus != null">
|
|
rec_status,
|
|
</if>
|
|
<if test="writeStartTime != null">
|
|
write_start_time,
|
|
</if>
|
|
<if test="writeEndTime != null">
|
|
write_end_time,
|
|
</if>
|
|
<if test="dataScope != null">
|
|
data_scope,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="questionnaireName != null">
|
|
#{questionnaireName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="startTime != null">
|
|
#{startTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="endTime != null">
|
|
#{endTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="type != null">
|
|
#{type,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
#{createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
#{updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="recStatus != null">
|
|
#{recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="writeStartTime != null">
|
|
#{writeStartTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="writeEndTime != null">
|
|
#{writeEndTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="dataScope != null">
|
|
#{dataScope,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.ScrScreeningExample" resultType="java.lang.Long">
|
|
select count(*) from scr_screening
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update scr_screening
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.questionnaireName != null">
|
|
questionnaire_name = #{record.questionnaireName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.startTime != null">
|
|
start_time = #{record.startTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.endTime != null">
|
|
end_time = #{record.endTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.type != null">
|
|
type = #{record.type,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.createdAt != null">
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.updatedAt != null">
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.recStatus != null">
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.writeStartTime != null">
|
|
write_start_time = #{record.writeStartTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.writeEndTime != null">
|
|
write_end_time = #{record.writeEndTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.dataScope != null">
|
|
data_scope = #{record.dataScope,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update scr_screening
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
questionnaire_name = #{record.questionnaireName,jdbcType=VARCHAR},
|
|
start_time = #{record.startTime,jdbcType=BIGINT},
|
|
end_time = #{record.endTime,jdbcType=BIGINT},
|
|
type = #{record.type,jdbcType=TINYINT},
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT},
|
|
write_start_time = #{record.writeStartTime,jdbcType=BIGINT},
|
|
write_end_time = #{record.writeEndTime,jdbcType=BIGINT},
|
|
data_scope = #{record.dataScope,jdbcType=VARCHAR}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.ScrScreening">
|
|
update scr_screening
|
|
<set>
|
|
<if test="questionnaireName != null">
|
|
questionnaire_name = #{questionnaireName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="startTime != null">
|
|
start_time = #{startTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="endTime != null">
|
|
end_time = #{endTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="type != null">
|
|
type = #{type,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="recStatus != null">
|
|
rec_status = #{recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="writeStartTime != null">
|
|
write_start_time = #{writeStartTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="writeEndTime != null">
|
|
write_end_time = #{writeEndTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="dataScope != null">
|
|
data_scope = #{dataScope,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.ScrScreening">
|
|
update scr_screening
|
|
set questionnaire_name = #{questionnaireName,jdbcType=VARCHAR},
|
|
start_time = #{startTime,jdbcType=BIGINT},
|
|
end_time = #{endTime,jdbcType=BIGINT},
|
|
type = #{type,jdbcType=TINYINT},
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{recStatus,jdbcType=TINYINT},
|
|
write_start_time = #{writeStartTime,jdbcType=BIGINT},
|
|
write_end_time = #{writeEndTime,jdbcType=BIGINT},
|
|
data_scope = #{dataScope,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper>
|