liusheng
2024-06-12 6d51501ca93f5bf46759f851988650477cf32e6c
smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
文件名从 smartor/src/main/resources/mapper/smartor/SvyLibTitleMapper.xml 修改
@@ -2,9 +2,9 @@
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.SvyLibTitleMapper">
<mapper namespace="com.smartor.mapper.SvyLibTemplateMapper">
    <resultMap type="com.smartor.domain.SvyLibTitle" id="SvyLibTitleResult">
    <resultMap type="com.smartor.domain.SvyLibTemplate" id="SvyLibTemplateResult">
        <result property="svyid" column="svyid"/>
        <result property="categoryid" column="categoryid"/>
        <result property="svycode" column="svycode"/>
@@ -35,7 +35,7 @@
        <result property="reply" column="reply"/>
    </resultMap>
    <sql id="selectSvyLibTitleVo">
    <sql id="selectSvyLibTemplateVo">
        select svyid,
               categoryid,
               value_type,
@@ -64,16 +64,16 @@
               campus,
               suitway,
               otherdata
        from svy_lib_title
        from svy_lib_template
    </sql>
    <select id="selectSvyLibTitleList" parameterType="com.smartor.domain.SvyLibTitleReq" resultMap="SvyLibTitleResult">
    <select id="selectSvyLibTemplateList" parameterType="com.smartor.domain.SvyLibTemplateReq" resultMap="SvyLibTemplateResult">
        select a.svyid, a.categoryid, a.svycode, a.svyname, a.description, a.introduce,a.submitprompt, a.templateid,
        a.version,a.centerlibrarycode, a.centerlibraryid, a.islocal, a.isenable, a.orgid, a.del_flag, a.create_by,
        a.create_time, a.update_by, a.update_time, a.isupload,
        a.upload_time,a.dept_names,a.value_type,a.label_info,a.reply,
        a.campus,a.suitway,a.otherdata
        ,c.icdname from svy_lib_title
        ,c.icdname from svy_lib_template
        a,icd10_association b,icd10 c
        <where>
            a.del_flag=0 and
@@ -86,14 +86,14 @@
        </where>
    </select>
    <select id="selectSvyLibTitleBySvyid" parameterType="Long" resultMap="SvyLibTitleResult">
        <include refid="selectSvyLibTitleVo"/>
    <select id="selectSvyLibTemplateBySvyid" parameterType="Long" resultMap="SvyLibTemplateResult">
        <include refid="selectSvyLibTemplateVo"/>
        where svyid = #{svyid} and del_flag=0
    </select>
    <insert id="insertSvyLibTitle" parameterType="com.smartor.domain.SvyLibTitle" useGeneratedKeys="true"
    <insert id="insertSvyLibTemplate" parameterType="com.smartor.domain.SvyLibTemplate" useGeneratedKeys="true"
            keyProperty="svyid">
        insert into svy_lib_title
        insert into svy_lib_template
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="categoryid != null">categoryid,</if>
            <if test="svycode != null">svycode,</if>
@@ -156,8 +156,8 @@
        </trim>
    </insert>
    <update id="updateSvyLibTitle" parameterType="com.smartor.domain.SvyLibTitle">
        update svy_lib_title
    <update id="updateSvyLibTemplate" parameterType="com.smartor.domain.SvyLibTemplate">
        update svy_lib_template
        <trim prefix="SET" suffixOverrides=",">
            <if test="categoryid != null">categoryid = #{categoryid},</if>
            <if test="svycode != null">svycode = #{svycode},</if>
@@ -190,14 +190,14 @@
        where svyid = #{svyid}
    </update>
    <delete id="deleteSvyLibTitleBySvyid" parameterType="Long">
    <delete id="deleteSvyLibTemplateBySvyid" parameterType="Long">
        delete
        from svy_lib_title
        from svy_lib_template
        where svyid = #{svyid}
    </delete>
    <delete id="deleteSvyLibTitleBySvyids" parameterType="String">
        delete from svy_lib_title where svyid in
    <delete id="deleteSvyLibTemplateBySvyids" parameterType="String">
        delete from svy_lib_template where svyid in
        <foreach item="svyid" collection="array" open="(" separator="," close=")">
            #{svyid}
        </foreach>