| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <?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.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAttachMapper">
- <resultMap type="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach" id="CaseAttachResult">
- <id property="annexId" column="annex_id" />
- <result property="caseAppliId" column="case_appli_id" />
- <result property="annexName" column="annex_name" />
- <result property="annexPath" column="annex_path" />
- <result property="annexType" column="annex_type" />
- <result property="note" column="note" />
- <result property="sealStatus" column="seal_status" />
- <result property="useId" column="use_id" />
- <result property="useAccount" column="use_account" />
- <result property="onlyOfficeFileId" column="only_office_file_id" />
- <result property="otherSysFileId" column="other_sys_file_id" />
- <result property="suffix" column="suffix" />
- </resultMap>
- <insert id="save" useGeneratedKeys="true" keyProperty="annexId">
- INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id,suffix)
- VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{useId},#{useAccount},#{sealStatus},#{onlyOfficeFileId},#{suffix})
- </insert>
- <insert id="batchSave" useGeneratedKeys="true" keyProperty="annexId">
- INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id,suffix)
- VALUES
- <foreach item="item" index="index" collection="list" separator=",">
-
-
- (#{item.caseAppliId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.useId},#{item.useAccount},#{item.sealStatus},#{item.onlyOfficeFileId},#{item.suffix})
- </foreach>
- </insert>
- <delete id="deleteByFileIds">
- delete from ms_case_attach
- where annex_id in
- <foreach collection="ids" item="id" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- <delete id="deleteByCasedIdAndType">
- delete from ms_case_attach
- where case_appli_id = #{caseAppliId}
- and annex_type = #{annexType}
- </delete>
-
- <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach" resultMap="CaseAttachResult">
- select *
- from ms_case_attach
- where case_appli_id =#{id}
- </select>
-
- <select id="listCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach" resultMap="CaseAttachResult">
- select *
- from ms_case_attach
- <where>
- <if test="caseAppliId != null ">
- AND case_appli_id = #{caseAppliId}
- </if>
- <if test="annexType != null ">
- AND annex_type = #{annexType}
- </if>
- </where>
- </select>
-
- <delete id="deleteCaseAttachByCasedIdAndType">
- delete from ms_case_attach
- where case_appli_id = #{caseAppliId}
- <if test="annexType != null ">
- and annex_type = #{annexType}
- </if>
- </delete>
- <delete id="batchDelete">
- delete from ms_case_attach
- where case_appli_id in
- <foreach collection="ids" item="id" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
-
- <select id="queryCaseAttachList" resultMap="CaseAttachResult">
- select *
- from ms_case_attach
- <where>
- <if test="id != null ">
- AND case_appli_id = #{id}
- </if>
- <if test="annexType != null ">
- AND annex_type = #{annexType}
- </if>
- <if test="annexTypeList != null and annexTypeList.size() > 0">
- and annex_type in
- <foreach item="annexType" collection="annexTypeList" open="(" separator="," close=")">
- #{annexType}
- </foreach>
- </if>
- </where>
- </select>
- <select id="queryAnnexById" resultMap="CaseAttachResult">
- select *
- from ms_case_attach
- <where>
- <if test="annexId != null ">
- AND annex_id = #{annexId}
- </if>
- </where>
- </select>
- <select id="countByfileName" resultType="java.lang.Integer">
- select count(1) from ms_case_attach where case_appli_id=#{caseAppliId} and annex_name=#{annexName}
- </select>
-
- <update id="updateCaseAttach" parameterType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach">
- update ms_case_attach
- set
- <if test="otherSysFileId != null and otherSysFileId != ''"> other_sys_file_id=#{otherSysFileId},</if>
- case_appli_id= #{caseAppliId}
-
- where annex_id = #{annexId}
- </update>
- <update id="batchUpdate">
- <foreach collection="list" item="item" >
- update ms_case_attach
- set
- case_appli_id= #{item.caseAppliId}
-
- where annex_id = #{item.annexId};
- </foreach>
- </update>
- <update id="updateCaseAttachBycaseid" parameterType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach" >
- update ms_case_attach
- <set>
- <if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
- <if test="otherSysFileId != null and otherSysFileId != ''"> other_sys_file_id=#{otherSysFileId},</if>
- <if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
- </set>
- <where>
- <if test="caseAppliId != null ">
- AND case_appli_id = #{caseAppliId}
- </if>
- <if test="annexType != null ">
- AND annex_type = #{annexType}
- </if>
- </where>
- </update>
-
-
- </mapper>
|