文件名从 smartor/src/main/resources/mapper/smartor/SvyLibTitleMapper.xml 修改 |
| | |
| | | <!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"/> |
| | |
| | | <result property="reply" column="reply"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibTitleVo"> |
| | | <sql id="selectSvyLibTemplateVo"> |
| | | select svyid, |
| | | categoryid, |
| | | value_type, |
| | |
| | | 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 |
| | |
| | | </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> |
| | |
| | | </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> |
| | |
| | | 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> |