|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
2
|
+<!DOCTYPE mapper
|
|
|
3
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
4
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
5
|
+<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAttachLogMapper">
|
|
|
6
|
+ <resultMap type="CaseAttach" id="CaseAttachResult">
|
|
|
7
|
+ <id property="annexId" column="annex_id" />
|
|
|
8
|
+ <result property="caseAppliId" column="case_appli_id" />
|
|
|
9
|
+ <result property="annexName" column="annex_name" />
|
|
|
10
|
+ <result property="annexPath" column="annex_path" />
|
|
|
11
|
+ <result property="annexType" column="annex_type" />
|
|
|
12
|
+ <result property="note" column="note" />
|
|
|
13
|
+ <result property="userId" column="use_id" />
|
|
|
14
|
+ <result property="userName" column="use_account" />
|
|
|
15
|
+ <result property="sealStatus" column="seal_status" />
|
|
|
16
|
+ <result property="caseAppliLogId" column="case_appli_log_id" />
|
|
|
17
|
+ </resultMap>
|
|
|
18
|
+ <insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
|
|
19
|
+ INSERT INTO case_attach_log (case_appli_log_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
|
|
|
20
|
+ VALUES (#{caseAppliLogId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus})
|
|
|
21
|
+ </insert>
|
|
|
22
|
+ <delete id="deleteByFileIds">
|
|
|
23
|
+ delete from case_attach_log
|
|
|
24
|
+ where annex_id in
|
|
|
25
|
+ <foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
|
26
|
+ #{id}
|
|
|
27
|
+ </foreach>
|
|
|
28
|
+ </delete>
|
|
|
29
|
+
|
|
|
30
|
+ <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
|
|
31
|
+ select annex_id,case_appli_log_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
|
|
32
|
+ from case_attach_log
|
|
|
33
|
+ where case_appli_log_id =#{id}
|
|
|
34
|
+ </select>
|
|
|
35
|
+
|
|
|
36
|
+ <select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
|
|
37
|
+ select annex_id,case_appli_log_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
|
|
38
|
+ from case_attach_log
|
|
|
39
|
+ <where>
|
|
|
40
|
+ <if test="caseAppliLogId != null ">
|
|
|
41
|
+ AND case_appli_log_id = #{caseAppliLogId}
|
|
|
42
|
+ </if>
|
|
|
43
|
+ <if test="annexType != null ">
|
|
|
44
|
+ AND annex_type = #{annexType}
|
|
|
45
|
+ </if>
|
|
|
46
|
+ </where>
|
|
|
47
|
+ </select>
|
|
|
48
|
+
|
|
|
49
|
+ <select id="queryCaseAttachList" resultMap="CaseAttachResult">
|
|
|
50
|
+ select annex_id,case_appli_log_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
|
|
51
|
+ from case_attach_log
|
|
|
52
|
+ <where>
|
|
|
53
|
+ <if test="caseLogId != null ">
|
|
|
54
|
+ AND case_appli_log_id = #{caseLogId}
|
|
|
55
|
+ </if>
|
|
|
56
|
+ <if test="annexType != null ">
|
|
|
57
|
+ AND annex_type = #{annexType}
|
|
|
58
|
+ </if>
|
|
|
59
|
+ <if test="annexTypeList != null and annexTypeList.size() > 0">
|
|
|
60
|
+ and annex_type in
|
|
|
61
|
+ <foreach item="annexType" collection="annexTypeList" open="(" separator="," close=")">
|
|
|
62
|
+ #{annexType}
|
|
|
63
|
+ </foreach>
|
|
|
64
|
+ </if>
|
|
|
65
|
+ </where>
|
|
|
66
|
+ </select>
|
|
|
67
|
+ <select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
|
|
68
|
+ select case_appli_log_id caseAppliLogId,annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
|
|
69
|
+ from case_attach_log
|
|
|
70
|
+ <where>
|
|
|
71
|
+ <if test="annexId != null ">
|
|
|
72
|
+ AND annex_id = #{annexId}
|
|
|
73
|
+ </if>
|
|
|
74
|
+ </where>
|
|
|
75
|
+ </select>
|
|
|
76
|
+
|
|
|
77
|
+ <update id="updateCaseAttach" parameterType="CaseAttach">
|
|
|
78
|
+ update case_attach_log
|
|
|
79
|
+ set
|
|
|
80
|
+ case_appli_log_id= #{caseAppliLogId}
|
|
|
81
|
+ where annex_id = #{annexId}
|
|
|
82
|
+ </update>
|
|
|
83
|
+
|
|
|
84
|
+ <update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
|
|
|
85
|
+ update case_attach_log
|
|
|
86
|
+ <set>
|
|
|
87
|
+ <if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
|
|
88
|
+ <if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
|
|
|
89
|
+ </set>
|
|
|
90
|
+ <where>
|
|
|
91
|
+ <if test="caseAppliId != null ">
|
|
|
92
|
+ AND case_appli_log_id = #{caseAppliLogId}
|
|
|
93
|
+ </if>
|
|
|
94
|
+ <if test="annexType != null ">
|
|
|
95
|
+ AND annex_type = #{annexType}
|
|
|
96
|
+ </if>
|
|
|
97
|
+ </where>
|
|
|
98
|
+ </update>
|
|
|
99
|
+
|
|
|
100
|
+
|
|
|
101
|
+</mapper>
|