MonitorSetSfNewMapper.xml
7.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?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.web.controller.monitorSetSfNew.mapper.MonitorSetSfNewMapper">
<resultMap type="MonitorSetSfNew" id="MonitorSetSfNewResult">
<result property="id" column="id" />
<result property="setId" column="setId" />
<result property="userId" column="userId" />
<result property="type" column="type" />
<result property="setWay" column="setWay" />
<result property="warningLevel" column="warningLevel" />
<result property="proceeding" column="proceeding" />
<result property="beginLevel" column="beginLevel" />
<result property="endLevel" column="endLevel" />
<result property="caseCon" column="caseCon" />
<result property="otherLevel" column="otherLevel" />
<result property="monitorStatus" column="monitorStatus" />
<result property="status" column="status" />
<result property="creditTime" column="creditTime" />
<result property="updateTime" column="updateTime" />
<result property="templateId" column="templateId" />
</resultMap>
<sql id="selectMonitorSetSfNewVo">
select id, setId, userId, type, setWay, warningLevel, proceeding, beginLevel, endLevel, caseCon, otherLevel, monitorStatus, status, creditTime, updateTime, templateId from monitor_set_sf_new
</sql>
<select id="selectMonitorSetSfNewList" parameterType="MonitorSetSfNew" resultMap="MonitorSetSfNewResult">
<include refid="selectMonitorSetSfNewVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="setId != null and setId != '' "> and setId = #{setId}</if>
<if test="userId != null and userId != '' "> and userId = #{userId}</if>
<if test="type != null and type != '' "> and type = #{type}</if>
<if test="setWay != null and setWay != '' "> and setWay = #{setWay}</if>
<if test="warningLevel != null and warningLevel != '' "> and warningLevel = #{warningLevel}</if>
<if test="proceeding != null and proceeding != '' "> and proceeding = #{proceeding}</if>
<if test="beginLevel != null "> and beginLevel = #{beginLevel}</if>
<if test="endLevel != null "> and endLevel = #{endLevel}</if>
<if test="caseCon != null and caseCon != '' "> and caseCon = #{caseCon}</if>
<if test="otherLevel != null and otherLevel != '' "> and otherLevel = #{otherLevel}</if>
<if test="monitorStatus != null and monitorStatus != '' "> and monitorStatus = #{monitorStatus}</if>
<if test="status != null and status != '' "> and status = #{status}</if>
<if test="creditTime != null "> and creditTime = #{creditTime}</if>
<if test="updateTime != null "> and updateTime = #{updateTime}</if>
<if test="templateId != null "> and templateId = #{templateId}</if>
</where>
</select>
<select id="selectMonitorSetSfNewById" parameterType="Integer" resultMap="MonitorSetSfNewResult">
<include refid="selectMonitorSetSfNewVo"/>
where id = #{id}
</select>
<insert id="insertMonitorSetSfNew" parameterType="MonitorSetSfNew" useGeneratedKeys="true" keyProperty="id">
insert into monitor_set_sf_new
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="setId != null and setId != '' ">setId,</if>
<if test="userId != null and userId != '' ">userId,</if>
<if test="type != null and type != '' ">type,</if>
<if test="setWay != null and setWay != '' ">setWay,</if>
<if test="warningLevel != null and warningLevel != '' ">warningLevel,</if>
<if test="proceeding != null and proceeding != '' ">proceeding,</if>
<if test="beginLevel != null ">beginLevel,</if>
<if test="endLevel != null ">endLevel,</if>
<if test="caseCon != null and caseCon != '' ">caseCon,</if>
<if test="otherLevel != null and otherLevel != '' ">otherLevel,</if>
<if test="monitorStatus != null and monitorStatus != '' ">monitorStatus,</if>
<if test="status != null and status != '' ">status,</if>
<if test="creditTime != null ">creditTime,</if>
<if test="updateTime != null ">updateTime,</if>
<if test="templateId != null ">templateId,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="setId != null and setId != '' ">#{setId},</if>
<if test="userId != null and userId != '' ">#{userId},</if>
<if test="type != null and type != '' ">#{type},</if>
<if test="setWay != null and setWay != '' ">#{setWay},</if>
<if test="warningLevel != null and warningLevel != '' ">#{warningLevel},</if>
<if test="proceeding != null and proceeding != '' ">#{proceeding},</if>
<if test="beginLevel != null ">#{beginLevel},</if>
<if test="endLevel != null ">#{endLevel},</if>
<if test="caseCon != null and caseCon != '' ">#{caseCon},</if>
<if test="otherLevel != null and otherLevel != '' ">#{otherLevel},</if>
<if test="monitorStatus != null and monitorStatus != '' ">#{monitorStatus},</if>
<if test="status != null and status != '' ">#{status},</if>
<if test="creditTime != null ">#{creditTime},</if>
<if test="updateTime != null ">#{updateTime},</if>
<if test="templateId != null ">#{templateId},</if>
</trim>
</insert>
<update id="updateMonitorSetSfNew" parameterType="MonitorSetSfNew">
update monitor_set_sf_new
<trim prefix="SET" suffixOverrides=",">
<if test="setId != null and setId != '' ">setId = #{setId},</if>
<if test="userId != null and userId != '' ">userId = #{userId},</if>
<if test="type != null and type != '' ">type = #{type},</if>
<if test="setWay != null and setWay != '' ">setWay = #{setWay},</if>
<if test="warningLevel != null and warningLevel != '' ">warningLevel = #{warningLevel},</if>
proceeding = #{proceeding},
beginLevel = #{beginLevel},
endLevel = #{endLevel},
caseCon = #{caseCon},
otherLevel = #{otherLevel},
<if test="monitorStatus != null and monitorStatus != '' ">monitorStatus = #{monitorStatus},</if>
<if test="status != null and status != '' ">status = #{status},</if>
<if test="creditTime != null ">creditTime = #{creditTime},</if>
<if test="updateTime != null ">updateTime = #{updateTime},</if>
<if test="templateId != null ">templateId = #{templateId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMonitorSetSfNewById" parameterType="Integer">
delete from monitor_set_sf_new where id = #{id}
</delete>
<delete id="deleteMonitorSetSfNewByIds" parameterType="String">
delete from monitor_set_sf_new where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>