|
|
@@ -0,0 +1,70 @@
|
|
|
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.CaseNumRuleMapper">
|
|
|
6
|
+ <resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.CaseNumRule" >
|
|
|
7
|
+ <result column="id" property="id" />
|
|
|
8
|
+ <result column="rule_type" property="ruleType" />
|
|
|
9
|
+ <result column="prefixstr" property="prefixstr" />
|
|
|
10
|
+ <result column="date_format" property="dateFormat" />
|
|
|
11
|
+ <result column="dept_name" property="deptName" />
|
|
|
12
|
+ <result column="current_num" property="currentNum" />
|
|
|
13
|
+ <result column="dept_name_firchar" property="deptNameFirchar" />
|
|
|
14
|
+ </resultMap>
|
|
|
15
|
+
|
|
|
16
|
+ <insert id="insertCaseNumRule" parameterType="CaseNumRule" useGeneratedKeys="true" keyProperty="id">
|
|
|
17
|
+ insert into case_num_rule(
|
|
|
18
|
+ <if test="ruleType != null">rule_type,</if>
|
|
|
19
|
+ <if test="prefixstr != null and prefixstr != '' ">prefixstr,</if>
|
|
|
20
|
+ <if test="dateFormat != null">date_format,</if>
|
|
|
21
|
+ <if test="deptName != null and deptName != '' ">dept_name,</if>
|
|
|
22
|
+ <if test="currentNum != null and currentNum != '' ">current_num,</if>
|
|
|
23
|
+ <if test="deptNameFirchar != null and deptNameFirchar != '' ">dept_name_firchar,</if>
|
|
|
24
|
+ create_by,
|
|
|
25
|
+ create_time
|
|
|
26
|
+ )values(
|
|
|
27
|
+ <if test="ruleType != null">#{ruleType},</if>
|
|
|
28
|
+ <if test="prefixstr != null and prefixstr != '' ">#{prefixstr},</if>
|
|
|
29
|
+ <if test="dateFormat != null">#{dateFormat},</if>
|
|
|
30
|
+ <if test="deptName != null and deptName != '' ">#{deptName},</if>
|
|
|
31
|
+ <if test="currentNum != null and currentNum != '' ">#{currentNum},</if>
|
|
|
32
|
+ <if test="deptNameFirchar != null and deptNameFirchar != '' ">#{deptNameFirchar},</if>
|
|
|
33
|
+ #{createBy},
|
|
|
34
|
+ sysdate()
|
|
|
35
|
+ )
|
|
|
36
|
+ </insert>
|
|
|
37
|
+
|
|
|
38
|
+ <update id="updateCaseNumRule" parameterType="CaseNumRule">
|
|
|
39
|
+ update case_num_rule
|
|
|
40
|
+ <set>
|
|
|
41
|
+ <if test="ruleType != null">rule_type = #{ruleType},</if>
|
|
|
42
|
+ <if test="prefixstr != null and prefixstr != '' ">prefixstr = #{prefixstr},</if>
|
|
|
43
|
+ <if test="dateFormat != null ">date_format = #{dateFormat},</if>
|
|
|
44
|
+ <if test="deptName != null and deptName != '' ">dept_name = #{deptName},</if>
|
|
|
45
|
+ <if test="currentNum != null and currentNum != '' ">current_num = #{currentNum},</if>
|
|
|
46
|
+ <if test="deptNameFirchar != null and deptNameFirchar != '' ">dept_name_firchar = #{deptNameFirchar},</if>
|
|
|
47
|
+ </set>
|
|
|
48
|
+ <where>
|
|
|
49
|
+ <if test="id != null">
|
|
|
50
|
+ AND id = #{id}
|
|
|
51
|
+ </if>
|
|
|
52
|
+ </where>
|
|
|
53
|
+ </update>
|
|
|
54
|
+ <delete id="deleteCaseNumRule" parameterType="CaseNumRule">
|
|
|
55
|
+ delete from case_num_rule where id = #{id}
|
|
|
56
|
+ </delete>
|
|
|
57
|
+
|
|
|
58
|
+ <select id="selectCaseNumRules" parameterType="CaseNumRule" resultMap="BaseResultMap">
|
|
|
59
|
+ SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar
|
|
|
60
|
+ FROM case_num_rule
|
|
|
61
|
+ <where>
|
|
|
62
|
+ <if test="deptNameFirchar != null and deptNameFirchar != ''">
|
|
|
63
|
+ AND dept_name_firchar = #{deptNameFirchar}
|
|
|
64
|
+ </if>
|
|
|
65
|
+ </where>
|
|
|
66
|
+ </select>
|
|
|
67
|
+
|
|
|
68
|
+
|
|
|
69
|
+
|
|
|
70
|
+</mapper>
|