|
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
2
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
3
|
+<mapper namespace="com.chinaitop.depot.basic.mapper.MonitorCameraMapper">
|
|
|
4
|
+ <resultMap id="BaseResultMap" type="com.chinaitop.depot.basic.model.MonitorCamera">
|
|
|
5
|
+ <constructor>
|
|
|
6
|
+ <idArg column="id" javaType="java.lang.Integer" jdbcType="INTEGER" />
|
|
|
7
|
+ <arg column="org_id" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
8
|
+ <arg column="name" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
9
|
+ <arg column="alias" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
10
|
+ <arg column="username" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
11
|
+ <arg column="password" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
12
|
+ <arg column="ip" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
13
|
+ <arg column="subnetmask" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
14
|
+ <arg column="gateway" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
15
|
+ <arg column="type" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
16
|
+ <arg column="port" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
17
|
+ <arg column="factory" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
18
|
+ <arg column="live" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
19
|
+ <arg column="model_number" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
20
|
+ <arg column="serial_number" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
21
|
+ <arg column="installation_site" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
22
|
+ <arg column="installation_method" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
23
|
+ <arg column="Irradiated_area" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
24
|
+ <arg column="power_position" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
25
|
+ <arg column="remark" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
26
|
+ <arg column="isremove" javaType="java.lang.String" jdbcType="VARCHAR" />
|
|
|
27
|
+ <arg column="update_time" javaType="java.util.Date" jdbcType="TIMESTAMP" />
|
|
|
28
|
+ </constructor>
|
|
|
29
|
+ </resultMap>
|
|
|
30
|
+ <sql id="Example_Where_Clause">
|
|
|
31
|
+ <where>
|
|
|
32
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
33
|
+ <if test="criteria.valid">
|
|
|
34
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
35
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
36
|
+ <choose>
|
|
|
37
|
+ <when test="criterion.noValue">
|
|
|
38
|
+ and ${criterion.condition}
|
|
|
39
|
+ </when>
|
|
|
40
|
+ <when test="criterion.singleValue">
|
|
|
41
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
42
|
+ </when>
|
|
|
43
|
+ <when test="criterion.betweenValue">
|
|
|
44
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
45
|
+ </when>
|
|
|
46
|
+ <when test="criterion.listValue">
|
|
|
47
|
+ and ${criterion.condition}
|
|
|
48
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
49
|
+ #{listItem}
|
|
|
50
|
+ </foreach>
|
|
|
51
|
+ </when>
|
|
|
52
|
+ </choose>
|
|
|
53
|
+ </foreach>
|
|
|
54
|
+ </trim>
|
|
|
55
|
+ </if>
|
|
|
56
|
+ </foreach>
|
|
|
57
|
+ </where>
|
|
|
58
|
+ </sql>
|
|
|
59
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
60
|
+ <where>
|
|
|
61
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
62
|
+ <if test="criteria.valid">
|
|
|
63
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
64
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
65
|
+ <choose>
|
|
|
66
|
+ <when test="criterion.noValue">
|
|
|
67
|
+ and ${criterion.condition}
|
|
|
68
|
+ </when>
|
|
|
69
|
+ <when test="criterion.singleValue">
|
|
|
70
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
71
|
+ </when>
|
|
|
72
|
+ <when test="criterion.betweenValue">
|
|
|
73
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
74
|
+ </when>
|
|
|
75
|
+ <when test="criterion.listValue">
|
|
|
76
|
+ and ${criterion.condition}
|
|
|
77
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
78
|
+ #{listItem}
|
|
|
79
|
+ </foreach>
|
|
|
80
|
+ </when>
|
|
|
81
|
+ </choose>
|
|
|
82
|
+ </foreach>
|
|
|
83
|
+ </trim>
|
|
|
84
|
+ </if>
|
|
|
85
|
+ </foreach>
|
|
|
86
|
+ </where>
|
|
|
87
|
+ </sql>
|
|
|
88
|
+ <sql id="Base_Column_List">
|
|
|
89
|
+ id, org_id, name, alias, username, password, ip, subnetmask, gateway, type, port,
|
|
|
90
|
+ factory, live, model_number, serial_number, installation_site, installation_method,
|
|
|
91
|
+ Irradiated_area, power_position, remark, isremove, update_time
|
|
|
92
|
+ </sql>
|
|
|
93
|
+ <select id="selectByExample" parameterType="com.chinaitop.depot.basic.model.MonitorCameraExample" resultMap="BaseResultMap">
|
|
|
94
|
+ select
|
|
|
95
|
+ <if test="distinct">
|
|
|
96
|
+ distinct
|
|
|
97
|
+ </if>
|
|
|
98
|
+ <include refid="Base_Column_List" />
|
|
|
99
|
+ from monitor_camera
|
|
|
100
|
+ <if test="_parameter != null">
|
|
|
101
|
+ <include refid="Example_Where_Clause" />
|
|
|
102
|
+ </if>
|
|
|
103
|
+ <if test="orderByClause != null">
|
|
|
104
|
+ order by ${orderByClause}
|
|
|
105
|
+ </if>
|
|
|
106
|
+</select>
|
|
|
107
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
108
|
+ select
|
|
|
109
|
+ <include refid="Base_Column_List" />
|
|
|
110
|
+ from monitor_camera
|
|
|
111
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
112
|
+ </select>
|
|
|
113
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
114
|
+ delete from monitor_camera
|
|
|
115
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
116
|
+ </delete>
|
|
|
117
|
+ <delete id="deleteByExample" parameterType="com.chinaitop.depot.basic.model.MonitorCameraExample">
|
|
|
118
|
+ delete from monitor_camera
|
|
|
119
|
+ <if test="_parameter != null">
|
|
|
120
|
+ <include refid="Example_Where_Clause" />
|
|
|
121
|
+ </if>
|
|
|
122
|
+ </delete>
|
|
|
123
|
+ <insert id="insert" parameterType="com.chinaitop.depot.basic.model.MonitorCamera">
|
|
|
124
|
+ insert into monitor_camera (id, org_id, name,
|
|
|
125
|
+ alias, username, password,
|
|
|
126
|
+ ip, subnetmask, gateway,
|
|
|
127
|
+ type, port, factory,
|
|
|
128
|
+ live, model_number, serial_number,
|
|
|
129
|
+ installation_site, installation_method, Irradiated_area,
|
|
|
130
|
+ power_position, remark, isremove,
|
|
|
131
|
+ update_time)
|
|
|
132
|
+ values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
133
|
+ #{alias,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
134
|
+ #{ip,jdbcType=VARCHAR}, #{subnetmask,jdbcType=VARCHAR}, #{gateway,jdbcType=VARCHAR},
|
|
|
135
|
+ #{type,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR}, #{factory,jdbcType=VARCHAR},
|
|
|
136
|
+ #{live,jdbcType=VARCHAR}, #{modelNumber,jdbcType=VARCHAR}, #{serialNumber,jdbcType=VARCHAR},
|
|
|
137
|
+ #{installationSite,jdbcType=VARCHAR}, #{installationMethod,jdbcType=VARCHAR}, #{irradiatedArea,jdbcType=VARCHAR},
|
|
|
138
|
+ #{powerPosition,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isremove,jdbcType=VARCHAR},
|
|
|
139
|
+ #{updateTime,jdbcType=TIMESTAMP})
|
|
|
140
|
+ </insert>
|
|
|
141
|
+ <insert id="insertSelective" parameterType="com.chinaitop.depot.basic.model.MonitorCamera">
|
|
|
142
|
+ insert into monitor_camera
|
|
|
143
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
144
|
+ <if test="id != null">
|
|
|
145
|
+ id,
|
|
|
146
|
+ </if>
|
|
|
147
|
+ <if test="orgId != null">
|
|
|
148
|
+ org_id,
|
|
|
149
|
+ </if>
|
|
|
150
|
+ <if test="name != null">
|
|
|
151
|
+ name,
|
|
|
152
|
+ </if>
|
|
|
153
|
+ <if test="alias != null">
|
|
|
154
|
+ alias,
|
|
|
155
|
+ </if>
|
|
|
156
|
+ <if test="username != null">
|
|
|
157
|
+ username,
|
|
|
158
|
+ </if>
|
|
|
159
|
+ <if test="password != null">
|
|
|
160
|
+ password,
|
|
|
161
|
+ </if>
|
|
|
162
|
+ <if test="ip != null">
|
|
|
163
|
+ ip,
|
|
|
164
|
+ </if>
|
|
|
165
|
+ <if test="subnetmask != null">
|
|
|
166
|
+ subnetmask,
|
|
|
167
|
+ </if>
|
|
|
168
|
+ <if test="gateway != null">
|
|
|
169
|
+ gateway,
|
|
|
170
|
+ </if>
|
|
|
171
|
+ <if test="type != null">
|
|
|
172
|
+ type,
|
|
|
173
|
+ </if>
|
|
|
174
|
+ <if test="port != null">
|
|
|
175
|
+ port,
|
|
|
176
|
+ </if>
|
|
|
177
|
+ <if test="factory != null">
|
|
|
178
|
+ factory,
|
|
|
179
|
+ </if>
|
|
|
180
|
+ <if test="live != null">
|
|
|
181
|
+ live,
|
|
|
182
|
+ </if>
|
|
|
183
|
+ <if test="modelNumber != null">
|
|
|
184
|
+ model_number,
|
|
|
185
|
+ </if>
|
|
|
186
|
+ <if test="serialNumber != null">
|
|
|
187
|
+ serial_number,
|
|
|
188
|
+ </if>
|
|
|
189
|
+ <if test="installationSite != null">
|
|
|
190
|
+ installation_site,
|
|
|
191
|
+ </if>
|
|
|
192
|
+ <if test="installationMethod != null">
|
|
|
193
|
+ installation_method,
|
|
|
194
|
+ </if>
|
|
|
195
|
+ <if test="irradiatedArea != null">
|
|
|
196
|
+ Irradiated_area,
|
|
|
197
|
+ </if>
|
|
|
198
|
+ <if test="powerPosition != null">
|
|
|
199
|
+ power_position,
|
|
|
200
|
+ </if>
|
|
|
201
|
+ <if test="remark != null">
|
|
|
202
|
+ remark,
|
|
|
203
|
+ </if>
|
|
|
204
|
+ <if test="isremove != null">
|
|
|
205
|
+ isremove,
|
|
|
206
|
+ </if>
|
|
|
207
|
+ <if test="updateTime != null">
|
|
|
208
|
+ update_time,
|
|
|
209
|
+ </if>
|
|
|
210
|
+ </trim>
|
|
|
211
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
212
|
+ <if test="id != null">
|
|
|
213
|
+ #{id,jdbcType=INTEGER},
|
|
|
214
|
+ </if>
|
|
|
215
|
+ <if test="orgId != null">
|
|
|
216
|
+ #{orgId,jdbcType=VARCHAR},
|
|
|
217
|
+ </if>
|
|
|
218
|
+ <if test="name != null">
|
|
|
219
|
+ #{name,jdbcType=VARCHAR},
|
|
|
220
|
+ </if>
|
|
|
221
|
+ <if test="alias != null">
|
|
|
222
|
+ #{alias,jdbcType=VARCHAR},
|
|
|
223
|
+ </if>
|
|
|
224
|
+ <if test="username != null">
|
|
|
225
|
+ #{username,jdbcType=VARCHAR},
|
|
|
226
|
+ </if>
|
|
|
227
|
+ <if test="password != null">
|
|
|
228
|
+ #{password,jdbcType=VARCHAR},
|
|
|
229
|
+ </if>
|
|
|
230
|
+ <if test="ip != null">
|
|
|
231
|
+ #{ip,jdbcType=VARCHAR},
|
|
|
232
|
+ </if>
|
|
|
233
|
+ <if test="subnetmask != null">
|
|
|
234
|
+ #{subnetmask,jdbcType=VARCHAR},
|
|
|
235
|
+ </if>
|
|
|
236
|
+ <if test="gateway != null">
|
|
|
237
|
+ #{gateway,jdbcType=VARCHAR},
|
|
|
238
|
+ </if>
|
|
|
239
|
+ <if test="type != null">
|
|
|
240
|
+ #{type,jdbcType=VARCHAR},
|
|
|
241
|
+ </if>
|
|
|
242
|
+ <if test="port != null">
|
|
|
243
|
+ #{port,jdbcType=VARCHAR},
|
|
|
244
|
+ </if>
|
|
|
245
|
+ <if test="factory != null">
|
|
|
246
|
+ #{factory,jdbcType=VARCHAR},
|
|
|
247
|
+ </if>
|
|
|
248
|
+ <if test="live != null">
|
|
|
249
|
+ #{live,jdbcType=VARCHAR},
|
|
|
250
|
+ </if>
|
|
|
251
|
+ <if test="modelNumber != null">
|
|
|
252
|
+ #{modelNumber,jdbcType=VARCHAR},
|
|
|
253
|
+ </if>
|
|
|
254
|
+ <if test="serialNumber != null">
|
|
|
255
|
+ #{serialNumber,jdbcType=VARCHAR},
|
|
|
256
|
+ </if>
|
|
|
257
|
+ <if test="installationSite != null">
|
|
|
258
|
+ #{installationSite,jdbcType=VARCHAR},
|
|
|
259
|
+ </if>
|
|
|
260
|
+ <if test="installationMethod != null">
|
|
|
261
|
+ #{installationMethod,jdbcType=VARCHAR},
|
|
|
262
|
+ </if>
|
|
|
263
|
+ <if test="irradiatedArea != null">
|
|
|
264
|
+ #{irradiatedArea,jdbcType=VARCHAR},
|
|
|
265
|
+ </if>
|
|
|
266
|
+ <if test="powerPosition != null">
|
|
|
267
|
+ #{powerPosition,jdbcType=VARCHAR},
|
|
|
268
|
+ </if>
|
|
|
269
|
+ <if test="remark != null">
|
|
|
270
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
271
|
+ </if>
|
|
|
272
|
+ <if test="isremove != null">
|
|
|
273
|
+ #{isremove,jdbcType=VARCHAR},
|
|
|
274
|
+ </if>
|
|
|
275
|
+ <if test="updateTime != null">
|
|
|
276
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
277
|
+ </if>
|
|
|
278
|
+ </trim>
|
|
|
279
|
+ </insert>
|
|
|
280
|
+ <select id="countByExample" parameterType="com.chinaitop.depot.basic.model.MonitorCameraExample" resultType="java.lang.Long">
|
|
|
281
|
+ select count(*) from monitor_camera
|
|
|
282
|
+ <if test="_parameter != null">
|
|
|
283
|
+ <include refid="Example_Where_Clause" />
|
|
|
284
|
+ </if>
|
|
|
285
|
+ </select>
|
|
|
286
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
287
|
+ update monitor_camera
|
|
|
288
|
+ <set>
|
|
|
289
|
+ <if test="record.id != null">
|
|
|
290
|
+ id = #{record.id,jdbcType=INTEGER},
|
|
|
291
|
+ </if>
|
|
|
292
|
+ <if test="record.orgId != null">
|
|
|
293
|
+ org_id = #{record.orgId,jdbcType=VARCHAR},
|
|
|
294
|
+ </if>
|
|
|
295
|
+ <if test="record.name != null">
|
|
|
296
|
+ name = #{record.name,jdbcType=VARCHAR},
|
|
|
297
|
+ </if>
|
|
|
298
|
+ <if test="record.alias != null">
|
|
|
299
|
+ alias = #{record.alias,jdbcType=VARCHAR},
|
|
|
300
|
+ </if>
|
|
|
301
|
+ <if test="record.username != null">
|
|
|
302
|
+ username = #{record.username,jdbcType=VARCHAR},
|
|
|
303
|
+ </if>
|
|
|
304
|
+ <if test="record.password != null">
|
|
|
305
|
+ password = #{record.password,jdbcType=VARCHAR},
|
|
|
306
|
+ </if>
|
|
|
307
|
+ <if test="record.ip != null">
|
|
|
308
|
+ ip = #{record.ip,jdbcType=VARCHAR},
|
|
|
309
|
+ </if>
|
|
|
310
|
+ <if test="record.subnetmask != null">
|
|
|
311
|
+ subnetmask = #{record.subnetmask,jdbcType=VARCHAR},
|
|
|
312
|
+ </if>
|
|
|
313
|
+ <if test="record.gateway != null">
|
|
|
314
|
+ gateway = #{record.gateway,jdbcType=VARCHAR},
|
|
|
315
|
+ </if>
|
|
|
316
|
+ <if test="record.type != null">
|
|
|
317
|
+ type = #{record.type,jdbcType=VARCHAR},
|
|
|
318
|
+ </if>
|
|
|
319
|
+ <if test="record.port != null">
|
|
|
320
|
+ port = #{record.port,jdbcType=VARCHAR},
|
|
|
321
|
+ </if>
|
|
|
322
|
+ <if test="record.factory != null">
|
|
|
323
|
+ factory = #{record.factory,jdbcType=VARCHAR},
|
|
|
324
|
+ </if>
|
|
|
325
|
+ <if test="record.live != null">
|
|
|
326
|
+ live = #{record.live,jdbcType=VARCHAR},
|
|
|
327
|
+ </if>
|
|
|
328
|
+ <if test="record.modelNumber != null">
|
|
|
329
|
+ model_number = #{record.modelNumber,jdbcType=VARCHAR},
|
|
|
330
|
+ </if>
|
|
|
331
|
+ <if test="record.serialNumber != null">
|
|
|
332
|
+ serial_number = #{record.serialNumber,jdbcType=VARCHAR},
|
|
|
333
|
+ </if>
|
|
|
334
|
+ <if test="record.installationSite != null">
|
|
|
335
|
+ installation_site = #{record.installationSite,jdbcType=VARCHAR},
|
|
|
336
|
+ </if>
|
|
|
337
|
+ <if test="record.installationMethod != null">
|
|
|
338
|
+ installation_method = #{record.installationMethod,jdbcType=VARCHAR},
|
|
|
339
|
+ </if>
|
|
|
340
|
+ <if test="record.irradiatedArea != null">
|
|
|
341
|
+ Irradiated_area = #{record.irradiatedArea,jdbcType=VARCHAR},
|
|
|
342
|
+ </if>
|
|
|
343
|
+ <if test="record.powerPosition != null">
|
|
|
344
|
+ power_position = #{record.powerPosition,jdbcType=VARCHAR},
|
|
|
345
|
+ </if>
|
|
|
346
|
+ <if test="record.remark != null">
|
|
|
347
|
+ remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
348
|
+ </if>
|
|
|
349
|
+ <if test="record.isremove != null">
|
|
|
350
|
+ isremove = #{record.isremove,jdbcType=VARCHAR},
|
|
|
351
|
+ </if>
|
|
|
352
|
+ <if test="record.updateTime != null">
|
|
|
353
|
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
354
|
+ </if>
|
|
|
355
|
+ </set>
|
|
|
356
|
+ <if test="_parameter != null">
|
|
|
357
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
358
|
+ </if>
|
|
|
359
|
+ </update>
|
|
|
360
|
+ <update id="updateByExample" parameterType="map">
|
|
|
361
|
+ update monitor_camera
|
|
|
362
|
+ set id = #{record.id,jdbcType=INTEGER},
|
|
|
363
|
+ org_id = #{record.orgId,jdbcType=VARCHAR},
|
|
|
364
|
+ name = #{record.name,jdbcType=VARCHAR},
|
|
|
365
|
+ alias = #{record.alias,jdbcType=VARCHAR},
|
|
|
366
|
+ username = #{record.username,jdbcType=VARCHAR},
|
|
|
367
|
+ password = #{record.password,jdbcType=VARCHAR},
|
|
|
368
|
+ ip = #{record.ip,jdbcType=VARCHAR},
|
|
|
369
|
+ subnetmask = #{record.subnetmask,jdbcType=VARCHAR},
|
|
|
370
|
+ gateway = #{record.gateway,jdbcType=VARCHAR},
|
|
|
371
|
+ type = #{record.type,jdbcType=VARCHAR},
|
|
|
372
|
+ port = #{record.port,jdbcType=VARCHAR},
|
|
|
373
|
+ factory = #{record.factory,jdbcType=VARCHAR},
|
|
|
374
|
+ live = #{record.live,jdbcType=VARCHAR},
|
|
|
375
|
+ model_number = #{record.modelNumber,jdbcType=VARCHAR},
|
|
|
376
|
+ serial_number = #{record.serialNumber,jdbcType=VARCHAR},
|
|
|
377
|
+ installation_site = #{record.installationSite,jdbcType=VARCHAR},
|
|
|
378
|
+ installation_method = #{record.installationMethod,jdbcType=VARCHAR},
|
|
|
379
|
+ Irradiated_area = #{record.irradiatedArea,jdbcType=VARCHAR},
|
|
|
380
|
+ power_position = #{record.powerPosition,jdbcType=VARCHAR},
|
|
|
381
|
+ remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
382
|
+ isremove = #{record.isremove,jdbcType=VARCHAR},
|
|
|
383
|
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
|
|
384
|
+ <if test="_parameter != null">
|
|
|
385
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
386
|
+ </if>
|
|
|
387
|
+ </update>
|
|
|
388
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.basic.model.MonitorCamera">
|
|
|
389
|
+ update monitor_camera
|
|
|
390
|
+ <set>
|
|
|
391
|
+ <if test="orgId != null">
|
|
|
392
|
+ org_id = #{orgId,jdbcType=VARCHAR},
|
|
|
393
|
+ </if>
|
|
|
394
|
+ <if test="name != null">
|
|
|
395
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
396
|
+ </if>
|
|
|
397
|
+ <if test="alias != null">
|
|
|
398
|
+ alias = #{alias,jdbcType=VARCHAR},
|
|
|
399
|
+ </if>
|
|
|
400
|
+ <if test="username != null">
|
|
|
401
|
+ username = #{username,jdbcType=VARCHAR},
|
|
|
402
|
+ </if>
|
|
|
403
|
+ <if test="password != null">
|
|
|
404
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
405
|
+ </if>
|
|
|
406
|
+ <if test="ip != null">
|
|
|
407
|
+ ip = #{ip,jdbcType=VARCHAR},
|
|
|
408
|
+ </if>
|
|
|
409
|
+ <if test="subnetmask != null">
|
|
|
410
|
+ subnetmask = #{subnetmask,jdbcType=VARCHAR},
|
|
|
411
|
+ </if>
|
|
|
412
|
+ <if test="gateway != null">
|
|
|
413
|
+ gateway = #{gateway,jdbcType=VARCHAR},
|
|
|
414
|
+ </if>
|
|
|
415
|
+ <if test="type != null">
|
|
|
416
|
+ type = #{type,jdbcType=VARCHAR},
|
|
|
417
|
+ </if>
|
|
|
418
|
+ <if test="port != null">
|
|
|
419
|
+ port = #{port,jdbcType=VARCHAR},
|
|
|
420
|
+ </if>
|
|
|
421
|
+ <if test="factory != null">
|
|
|
422
|
+ factory = #{factory,jdbcType=VARCHAR},
|
|
|
423
|
+ </if>
|
|
|
424
|
+ <if test="live != null">
|
|
|
425
|
+ live = #{live,jdbcType=VARCHAR},
|
|
|
426
|
+ </if>
|
|
|
427
|
+ <if test="modelNumber != null">
|
|
|
428
|
+ model_number = #{modelNumber,jdbcType=VARCHAR},
|
|
|
429
|
+ </if>
|
|
|
430
|
+ <if test="serialNumber != null">
|
|
|
431
|
+ serial_number = #{serialNumber,jdbcType=VARCHAR},
|
|
|
432
|
+ </if>
|
|
|
433
|
+ <if test="installationSite != null">
|
|
|
434
|
+ installation_site = #{installationSite,jdbcType=VARCHAR},
|
|
|
435
|
+ </if>
|
|
|
436
|
+ <if test="installationMethod != null">
|
|
|
437
|
+ installation_method = #{installationMethod,jdbcType=VARCHAR},
|
|
|
438
|
+ </if>
|
|
|
439
|
+ <if test="irradiatedArea != null">
|
|
|
440
|
+ Irradiated_area = #{irradiatedArea,jdbcType=VARCHAR},
|
|
|
441
|
+ </if>
|
|
|
442
|
+ <if test="powerPosition != null">
|
|
|
443
|
+ power_position = #{powerPosition,jdbcType=VARCHAR},
|
|
|
444
|
+ </if>
|
|
|
445
|
+ <if test="remark != null">
|
|
|
446
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
447
|
+ </if>
|
|
|
448
|
+ <if test="isremove != null">
|
|
|
449
|
+ isremove = #{isremove,jdbcType=VARCHAR},
|
|
|
450
|
+ </if>
|
|
|
451
|
+ <if test="updateTime != null">
|
|
|
452
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
453
|
+ </if>
|
|
|
454
|
+ </set>
|
|
|
455
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
456
|
+ </update>
|
|
|
457
|
+ <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.basic.model.MonitorCamera">
|
|
|
458
|
+ update monitor_camera
|
|
|
459
|
+ set org_id = #{orgId,jdbcType=VARCHAR},
|
|
|
460
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
461
|
+ alias = #{alias,jdbcType=VARCHAR},
|
|
|
462
|
+ username = #{username,jdbcType=VARCHAR},
|
|
|
463
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
464
|
+ ip = #{ip,jdbcType=VARCHAR},
|
|
|
465
|
+ subnetmask = #{subnetmask,jdbcType=VARCHAR},
|
|
|
466
|
+ gateway = #{gateway,jdbcType=VARCHAR},
|
|
|
467
|
+ type = #{type,jdbcType=VARCHAR},
|
|
|
468
|
+ port = #{port,jdbcType=VARCHAR},
|
|
|
469
|
+ factory = #{factory,jdbcType=VARCHAR},
|
|
|
470
|
+ live = #{live,jdbcType=VARCHAR},
|
|
|
471
|
+ model_number = #{modelNumber,jdbcType=VARCHAR},
|
|
|
472
|
+ serial_number = #{serialNumber,jdbcType=VARCHAR},
|
|
|
473
|
+ installation_site = #{installationSite,jdbcType=VARCHAR},
|
|
|
474
|
+ installation_method = #{installationMethod,jdbcType=VARCHAR},
|
|
|
475
|
+ Irradiated_area = #{irradiatedArea,jdbcType=VARCHAR},
|
|
|
476
|
+ power_position = #{powerPosition,jdbcType=VARCHAR},
|
|
|
477
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
478
|
+ isremove = #{isremove,jdbcType=VARCHAR},
|
|
|
479
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
480
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
481
|
+ </update>
|
|
|
482
|
+ <select id="selectByNVRDates" resultType="java.util.HashMap" parameterType="java.util.Map" >
|
|
|
483
|
+ SELECT
|
|
|
484
|
+ camera.id cameraId,
|
|
|
485
|
+ camera.alias,
|
|
|
486
|
+ camera.factory,
|
|
|
487
|
+ camera.live,
|
|
|
488
|
+ camera.ip cameraIp,
|
|
|
489
|
+ camera.username cameraName,
|
|
|
490
|
+ camera.password cameraPassword,
|
|
|
491
|
+ camera.port cameraPort,
|
|
|
492
|
+ camera.type cameraType,
|
|
|
493
|
+ nvr.ip nvrIp,
|
|
|
494
|
+ nvr.username nvrName,
|
|
|
495
|
+ nvr. PASSWORD nvrPassword,
|
|
|
496
|
+ nvr. PORT nvrPort,
|
|
|
497
|
+ nvr.factory nvrFactory,
|
|
|
498
|
+ tdh.channel_number channelNumber
|
|
|
499
|
+ FROM
|
|
|
500
|
+ monitor_camera camera
|
|
|
501
|
+ LEFT JOIN monitor_nvr_camera tdh ON tdh.camera_id = camera.id
|
|
|
502
|
+ LEFT JOIN monitor_nvr nvr ON nvr.id = tdh.nvr_id
|
|
|
503
|
+ WHERE camera.org_id = #{orgid,jdbcType=VARCHAR} AND nvr.org_id = #{orgid,jdbcType=VARCHAR}
|
|
|
504
|
+ GROUP BY camera.id
|
|
|
505
|
+ </select>
|
|
|
506
|
+ <select id="selectByCameraAndNVR" resultType="java.util.HashMap">
|
|
|
507
|
+ SELECT
|
|
|
508
|
+ camera.id Id,
|
|
|
509
|
+ camera.alias,
|
|
|
510
|
+ camera.factory,
|
|
|
511
|
+ camera.live,
|
|
|
512
|
+ camera.ip Ip,
|
|
|
513
|
+ camera.username Name,
|
|
|
514
|
+ camera.password Password,
|
|
|
515
|
+ camera.port Port,
|
|
|
516
|
+ camera.type Type,
|
|
|
517
|
+ tdh.channel_number channelNumber,
|
|
|
518
|
+ tdh.nvr_id nvr_id,
|
|
|
519
|
+ (@ic :=@ic) AS isCamera
|
|
|
520
|
+ FROM
|
|
|
521
|
+ (SELECT @ic := 1) AS icamera,monitor_camera camera
|
|
|
522
|
+ LEFT JOIN monitor_nvr_camera tdh ON tdh.camera_id = camera.id
|
|
|
523
|
+ GROUP BY camera.id
|
|
|
524
|
+ UNION ALL
|
|
|
525
|
+ SELECT
|
|
|
526
|
+ nvr.id Id,
|
|
|
527
|
+ nvr.alias,
|
|
|
528
|
+ nvr.factory,
|
|
|
529
|
+ nvr.position live,
|
|
|
530
|
+ nvr.ip live,
|
|
|
531
|
+ nvr.username Ip,
|
|
|
532
|
+ nvr. PASSWORD Password,
|
|
|
533
|
+ nvr. PORT Port,
|
|
|
534
|
+ nvr. type Type,
|
|
|
535
|
+ tdh.channel_number channelNumber,
|
|
|
536
|
+ tdh.nvr_id nvr_id,
|
|
|
537
|
+ (@iv :=@iv) AS isCamera
|
|
|
538
|
+ FROM
|
|
|
539
|
+ (SELECT @iv := 2) AS invr,monitor_nvr nvr
|
|
|
540
|
+ LEFT JOIN monitor_nvr_camera tdh ON tdh.nvr_id = nvr.id
|
|
|
541
|
+ GROUP BY nvr.id
|
|
|
542
|
+</select>
|
|
|
543
|
+
|
|
|
544
|
+ <select id="selectByGroupId" parameterType="java.lang.String" resultType="java.util.HashMap">
|
|
|
545
|
+ SELECT
|
|
|
546
|
+ c.id,c.alias,c.ip,c.username,c.`password`,c.`port`,c.factory, c.type,c.org_id
|
|
|
547
|
+ FROM
|
|
|
548
|
+ monitor_camera c
|
|
|
549
|
+ LEFT JOIN monitor_gorup_camera gc ON gc.cameraid = c.id
|
|
|
550
|
+ WHERE
|
|
|
551
|
+ c.isremove = '1'
|
|
|
552
|
+ AND
|
|
|
553
|
+ gc.groupid = #{groupid,jdbcType=VARCHAR}
|
|
|
554
|
+ </select>
|
|
|
555
|
+
|
|
|
556
|
+
|
|
|
557
|
+
|
|
|
558
|
+</mapper>
|