|
|
@@ -0,0 +1,62 @@
|
|
|
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.TemplateManualMapper">
|
|
|
6
|
+ <resultMap type="TemplateManual" id="TemplateManualResult">
|
|
|
7
|
+ <id property="id" column="id" />
|
|
|
8
|
+ <result property="name" column="name" />
|
|
|
9
|
+ <result property="content" column="content" />
|
|
|
10
|
+ <result property="type" column="type" />
|
|
|
11
|
+ <result property="delFlag" column="del_flag" />
|
|
|
12
|
+ </resultMap>
|
|
|
13
|
+ <insert id="insertTemplateManual" parameterType="TemplateManual" useGeneratedKeys="true" keyProperty="id">
|
|
|
14
|
+ insert into template_manual(
|
|
|
15
|
+ <if test="name != null and name != ''">name,</if>
|
|
|
16
|
+ <if test="content != null and content != '' ">content,</if>
|
|
|
17
|
+ <if test="type != null ">type,</if>
|
|
|
18
|
+ del_flag
|
|
|
19
|
+ )values(
|
|
|
20
|
+ <if test="name != null and name != ''">#{name},</if>
|
|
|
21
|
+ <if test="content != null and content != '' ">#{content},</if>
|
|
|
22
|
+ <if test="type != null ">#{type},</if>
|
|
|
23
|
+ 0
|
|
|
24
|
+ )
|
|
|
25
|
+ </insert>
|
|
|
26
|
+
|
|
|
27
|
+ <update id="updateTemplateManual" parameterType="TemplateManual">
|
|
|
28
|
+ update template_manual
|
|
|
29
|
+ <set>
|
|
|
30
|
+ <if test="name != null and name != ''">name = #{name},</if>
|
|
|
31
|
+ <if test="content != null and content != '' ">content = #{content},</if>
|
|
|
32
|
+ <if test="type != null ">type = #{type},</if>
|
|
|
33
|
+ <if test="delFlag != null ">del_flag = #{delFlag},</if>
|
|
|
34
|
+ </set>
|
|
|
35
|
+ <where>
|
|
|
36
|
+ <if test="id != null">
|
|
|
37
|
+ AND id = #{id}
|
|
|
38
|
+ </if>
|
|
|
39
|
+
|
|
|
40
|
+ </where>
|
|
|
41
|
+ </update>
|
|
|
42
|
+ <select id="selectTemplateManual" parameterType="TemplateManual" resultMap="TemplateManualResult">
|
|
|
43
|
+ SELECT id, name ,content , type
|
|
|
44
|
+ FROM template_manual
|
|
|
45
|
+ <where>
|
|
|
46
|
+ <if test="id != null">
|
|
|
47
|
+ AND id = #{id}
|
|
|
48
|
+ </if>
|
|
|
49
|
+ <if test="name != null and name != ''">
|
|
|
50
|
+ AND name = #{name}
|
|
|
51
|
+ </if>
|
|
|
52
|
+ <if test="content != null and content != ''">
|
|
|
53
|
+ AND content = #{content}
|
|
|
54
|
+ </if>
|
|
|
55
|
+ <if test="type != null ">
|
|
|
56
|
+ AND type = #{type}
|
|
|
57
|
+ </if>
|
|
|
58
|
+ AND del_flag =0
|
|
|
59
|
+ </where>
|
|
|
60
|
+ </select>
|
|
|
61
|
+
|
|
|
62
|
+</mapper>
|