|
|
@@ -0,0 +1,108 @@
|
|
|
+<?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="cn.tr.module.smart.common.repository.BizMissionDocSquareRepository">
|
|
|
+ <resultMap id="MissionDocSquare" type="cn.tr.module.smart.common.po.BizMissionDocSquarePO">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="type" column="type"/>
|
|
|
+ <result property="title" column="title"/>
|
|
|
+ <result property="source" column="source"/>
|
|
|
+ <result property="image" column="image"/>
|
|
|
+ <result property="content" column="content"/>
|
|
|
+ <result property="phase" column="phase"/>
|
|
|
+ <result property="intervalMinDay" column="interval_min_day"/>
|
|
|
+ <result property="intervalMaxDay" column="interval_max_day"/>
|
|
|
+ <result property="tenantId" column="tenant_id"/>
|
|
|
+ <result property="citationCount" column="citation_count"/>
|
|
|
+ <result property="owner" column="owner"/>
|
|
|
+ <result property="md5" column="md5"/>
|
|
|
+ <result property="version" column="version"/>
|
|
|
+ <result property="hospitalDocId" column="hospital_doc_id"/>
|
|
|
+ <result property="contentMd5" column="content_md5"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="deleted" column="deleted"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="baseColumn">
|
|
|
+ id
|
|
|
+ , type, title, source, image, content, phase, interval_min_day, interval_max_day, tenant_id, citation_count, owner, md5, version, hospital_doc_id, content_md5, create_time, create_by, update_time, update_by, deleted
|
|
|
+ </sql>
|
|
|
+ <update id="updateBizMissionDocSquareById">
|
|
|
+ UPDATE biz_mission_doc_square
|
|
|
+ <set>
|
|
|
+ <if test="type != null">
|
|
|
+ type = #{type ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ title = #{title ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="source != null">
|
|
|
+ source = #{source ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="image != null">
|
|
|
+ image = #{image ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content = #{content ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="phase != null">
|
|
|
+ phase = #{phase ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="intervalMinDay != null">
|
|
|
+ interval_min_day = #{intervalMinDay ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="intervalMaxDay != null">
|
|
|
+ interval_max_day = #{intervalMaxDay ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ tenant_id = #{tenantId ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="citationCount != null">
|
|
|
+ citation_count = #{citationCount ,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="owner != null">
|
|
|
+ owner = #{owner ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="md5 != null">
|
|
|
+ md5 = #{md5 ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="version != null">
|
|
|
+ version = #{version ,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="hospitalDocId != null">
|
|
|
+ hospital_doc_id = #{hospitalDocId ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="contentMd5 != null">
|
|
|
+ content_md5 = #{contentMd5 ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime ,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ create_by = #{createBy ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime ,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ update_by = #{updateBy ,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ deleted = #{deleted ,jdbcType=BIT},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id ,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectOneByHospitalId" resultMap="MissionDocSquare">
|
|
|
+ select
|
|
|
+ <include refid="baseColumn"/>
|
|
|
+ from biz_mission_doc_square
|
|
|
+ where hospital_doc_id = #{id ,jdbcType=VARCHAR}
|
|
|
+ order by create_time desc
|
|
|
+ limit 1
|
|
|
+ </select>
|
|
|
+</mapper>
|