包分类
This commit is contained in:
+108
@@ -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="com.ruoyi.wisdomarbitrate.mapper.mscase.CaseAttachLogMapper">
|
||||
<resultMap type="CaseAttach" 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="userId" column="use_id" />
|
||||
<result property="userName" column="use_account" />
|
||||
<result property="sealStatus" column="seal_status" />
|
||||
<result property="caseAppliLogId" column="case_appli_log_id" />
|
||||
</resultMap>
|
||||
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
||||
INSERT INTO ms_case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
|
||||
VALUES (#{caseAppliLogId},#{annexId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus})
|
||||
</insert>
|
||||
<insert id="batchSave">
|
||||
INSERT INTO ms_case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
|
||||
VALUES
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.caseAppliLogId},#{item.annexId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.userId},#{item.userName},#{item.sealStatus})
|
||||
</foreach>
|
||||
</insert>
|
||||
<delete id="deleteByFileIds">
|
||||
delete from ms_case_attach_log
|
||||
where annex_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.dto.mscase.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from ms_case_attach_log
|
||||
where case_appli_log_id =#{id}
|
||||
</select>
|
||||
|
||||
<select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.dto.mscase.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from ms_case_attach_log
|
||||
<where>
|
||||
<if test="caseAppliLogId != null ">
|
||||
AND case_appli_log_id = #{caseAppliLogId}
|
||||
</if>
|
||||
<if test="annexType != null ">
|
||||
AND annex_type = #{annexType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from ms_case_attach_log
|
||||
<where>
|
||||
<if test="caseLogId != null ">
|
||||
AND case_appli_log_id = #{caseLogId}
|
||||
</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" resultType="com.ruoyi.wisdomarbitrate.domain.dto.mscase.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from ms_case_attach_log
|
||||
<where>
|
||||
<if test="annexId != null ">
|
||||
AND annex_id = #{annexId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updateCaseAttach" parameterType="CaseAttach">
|
||||
update ms_case_attach_log
|
||||
set
|
||||
case_appli_log_id= #{caseAppliLogId}
|
||||
where annex_id = #{annexId}
|
||||
</update>
|
||||
|
||||
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
|
||||
update ms_case_attach_log
|
||||
<set>
|
||||
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
||||
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
AND case_appli_log_id = #{caseAppliLogId}
|
||||
</if>
|
||||
<if test="annexType != null ">
|
||||
AND annex_type = #{annexType}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user