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.
354 lines
14 KiB
354 lines
14 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.HtPatientCanvasMapper">
|
|
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientCanvas">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="patient_report_id" jdbcType="BIGINT" property="patientReportId" />
|
|
<result column="question_id" jdbcType="BIGINT" property="questionId" />
|
|
<result column="begin_time" jdbcType="BIGINT" property="beginTime" />
|
|
<result column="canvas_width" jdbcType="INTEGER" property="canvasWidth" />
|
|
<result column="canvas_height" jdbcType="INTEGER" property="canvasHeight" />
|
|
<result column="line_color" jdbcType="VARCHAR" property="lineColor" />
|
|
<result column="line_width" jdbcType="INTEGER" property="lineWidth" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
<result column="is_del" jdbcType="TINYINT" property="isDel" />
|
|
<result column="open_canvas_time" jdbcType="BIGINT" property="openCanvasTime" />
|
|
<result column="beyond_proportion" jdbcType="VARCHAR" property="beyondProportion" />
|
|
<result column="background_url" jdbcType="VARCHAR" property="backgroundUrl" />
|
|
</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, patient_report_id, question_id, begin_time, canvas_width, canvas_height, line_color,
|
|
line_width, create_time, update_time, is_del, open_canvas_time, beyond_proportion,
|
|
background_url
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from t_ht_patient_canvas
|
|
<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_patient_canvas
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from t_ht_patient_canvas
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasExample">
|
|
delete from t_ht_patient_canvas
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientCanvas">
|
|
insert into t_ht_patient_canvas (id, patient_report_id, question_id,
|
|
begin_time, canvas_width, canvas_height,
|
|
line_color, line_width, create_time,
|
|
update_time, is_del, open_canvas_time,
|
|
beyond_proportion, background_url)
|
|
values (#{id,jdbcType=BIGINT}, #{patientReportId,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT},
|
|
#{beginTime,jdbcType=BIGINT}, #{canvasWidth,jdbcType=INTEGER}, #{canvasHeight,jdbcType=INTEGER},
|
|
#{lineColor,jdbcType=VARCHAR}, #{lineWidth,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}, #{openCanvasTime,jdbcType=BIGINT},
|
|
#{beyondProportion,jdbcType=VARCHAR}, #{backgroundUrl,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientCanvas">
|
|
insert into t_ht_patient_canvas
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="patientReportId != null">
|
|
patient_report_id,
|
|
</if>
|
|
<if test="questionId != null">
|
|
question_id,
|
|
</if>
|
|
<if test="beginTime != null">
|
|
begin_time,
|
|
</if>
|
|
<if test="canvasWidth != null">
|
|
canvas_width,
|
|
</if>
|
|
<if test="canvasHeight != null">
|
|
canvas_height,
|
|
</if>
|
|
<if test="lineColor != null">
|
|
line_color,
|
|
</if>
|
|
<if test="lineWidth != null">
|
|
line_width,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
<if test="isDel != null">
|
|
is_del,
|
|
</if>
|
|
<if test="openCanvasTime != null">
|
|
open_canvas_time,
|
|
</if>
|
|
<if test="beyondProportion != null">
|
|
beyond_proportion,
|
|
</if>
|
|
<if test="backgroundUrl != null">
|
|
background_url,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="patientReportId != null">
|
|
#{patientReportId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="questionId != null">
|
|
#{questionId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="beginTime != null">
|
|
#{beginTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="canvasWidth != null">
|
|
#{canvasWidth,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="canvasHeight != null">
|
|
#{canvasHeight,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="lineColor != null">
|
|
#{lineColor,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="lineWidth != null">
|
|
#{lineWidth,jdbcType=INTEGER},
|
|
</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>
|
|
<if test="openCanvasTime != null">
|
|
#{openCanvasTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="beyondProportion != null">
|
|
#{beyondProportion,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="backgroundUrl != null">
|
|
#{backgroundUrl,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasExample" resultType="java.lang.Long">
|
|
select count(*) from t_ht_patient_canvas
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update t_ht_patient_canvas
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.patientReportId != null">
|
|
patient_report_id = #{record.patientReportId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.questionId != null">
|
|
question_id = #{record.questionId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.beginTime != null">
|
|
begin_time = #{record.beginTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.canvasWidth != null">
|
|
canvas_width = #{record.canvasWidth,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.canvasHeight != null">
|
|
canvas_height = #{record.canvasHeight,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.lineColor != null">
|
|
line_color = #{record.lineColor,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.lineWidth != null">
|
|
line_width = #{record.lineWidth,jdbcType=INTEGER},
|
|
</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>
|
|
<if test="record.openCanvasTime != null">
|
|
open_canvas_time = #{record.openCanvasTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.beyondProportion != null">
|
|
beyond_proportion = #{record.beyondProportion,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.backgroundUrl != null">
|
|
background_url = #{record.backgroundUrl,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update t_ht_patient_canvas
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
patient_report_id = #{record.patientReportId,jdbcType=BIGINT},
|
|
question_id = #{record.questionId,jdbcType=BIGINT},
|
|
begin_time = #{record.beginTime,jdbcType=BIGINT},
|
|
canvas_width = #{record.canvasWidth,jdbcType=INTEGER},
|
|
canvas_height = #{record.canvasHeight,jdbcType=INTEGER},
|
|
line_color = #{record.lineColor,jdbcType=VARCHAR},
|
|
line_width = #{record.lineWidth,jdbcType=INTEGER},
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
is_del = #{record.isDel,jdbcType=TINYINT},
|
|
open_canvas_time = #{record.openCanvasTime,jdbcType=BIGINT},
|
|
beyond_proportion = #{record.beyondProportion,jdbcType=VARCHAR},
|
|
background_url = #{record.backgroundUrl,jdbcType=VARCHAR}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientCanvas">
|
|
update t_ht_patient_canvas
|
|
<set>
|
|
<if test="patientReportId != null">
|
|
patient_report_id = #{patientReportId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="questionId != null">
|
|
question_id = #{questionId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="beginTime != null">
|
|
begin_time = #{beginTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="canvasWidth != null">
|
|
canvas_width = #{canvasWidth,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="canvasHeight != null">
|
|
canvas_height = #{canvasHeight,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="lineColor != null">
|
|
line_color = #{lineColor,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="lineWidth != null">
|
|
line_width = #{lineWidth,jdbcType=INTEGER},
|
|
</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>
|
|
<if test="openCanvasTime != null">
|
|
open_canvas_time = #{openCanvasTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="beyondProportion != null">
|
|
beyond_proportion = #{beyondProportion,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="backgroundUrl != null">
|
|
background_url = #{backgroundUrl,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientCanvas">
|
|
update t_ht_patient_canvas
|
|
set patient_report_id = #{patientReportId,jdbcType=BIGINT},
|
|
question_id = #{questionId,jdbcType=BIGINT},
|
|
begin_time = #{beginTime,jdbcType=BIGINT},
|
|
canvas_width = #{canvasWidth,jdbcType=INTEGER},
|
|
canvas_height = #{canvasHeight,jdbcType=INTEGER},
|
|
line_color = #{lineColor,jdbcType=VARCHAR},
|
|
line_width = #{lineWidth,jdbcType=INTEGER},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
is_del = #{isDel,jdbcType=TINYINT},
|
|
open_canvas_time = #{openCanvasTime,jdbcType=BIGINT},
|
|
beyond_proportion = #{beyondProportion,jdbcType=VARCHAR},
|
|
background_url = #{backgroundUrl,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper>
|