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
| <?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.genersoft.iot.vmp.netty.business.mapper.TalkBackEquipmentMapper">
|
| <!--新增对讲设备信息-->
| <insert id="saveTalkBackEquipment" useGeneratedKeys="true" keyProperty="id">
| insert into sys_talk_back_equipment
| (
| name,code,status,unit_name,unit_code,police_name,police_code,terminal_number,longitude,latitude,
| type,speed,direction,elevation,precisions,receive_time,create_time,update_time
| )
| values
| (
| #{name},#{code},#{status},#{unitName},#{unitCode},#{policeName},#{policeCode},#{terminalNumber},#{longitude},#{latitude},
| #{type},#{speed},#{direction},#{elevation},#{precisions},#{receiveTime},#{createTime},#{updateTime}
| )
| </insert>
|
| <!--新增对接设备历史记录信息-->
| <insert id="saveTalkBackEquipmentRecord">
| insert into sys_talk_back_equipment_record
| (
| talk_back_equipment_id,status,unit_name,unit_code,police_name,police_code,terminal_number,
| longitude,latitude,type,speed,direction,elevation,precisions,receive_time,create_time
| )
| values
| (
| #{talkBackEquipmentId},#{status},#{unitName},#{unitCode},#{policeName},#{policeCode},#{terminalNumber},
| #{longitude},#{latitude}, #{type},#{speed},#{direction},#{elevation},#{precisions},#{receiveTime},#{createTime}
| )
| </insert>
|
| <!--修改对讲设备信息-->
| <update id="updateTalkBackEquipment">
| update sys_talk_back_equipment
| set
| code = #{code},
| name = #{name},
| status = #{status},
| <if test="null!=unitName and unitName!=''">
| unit_name = #{unitName},
| </if>
| <if test="null!=unitCode and unitCode!=''">
| unit_code = #{unitCode},
| </if>
| <if test="null!=policeName and policeName!=''">
| police_name = #{policeName},
| </if>
| <if test="null!=policeCode and policeCode!=''">
| police_code = #{policeCode},
| </if>
| <if test="null!=terminalNumber and terminalNumber!=''">
| terminal_number = #{terminalNumber},
| </if>
| <if test="null!=longitude and longitude!=''">
| longitude = #{longitude},
| </if>
| <if test="null!=latitude and latitude!=''">
| latitude = #{latitude},
| </if>
| <if test="null!=speed and speed!=''">
| speed = #{speed},
| </if>
| <if test="null!=direction and direction!=''">
| direction = #{direction},
| </if>
| <if test="null!=elevation and elevation!=''">
| elevation = #{elevation},
| </if>
| <if test="null!=precisions and precisions!=''">
| precisions = #{precisions},
| </if>
| <if test="null!=receiveTime">
| receive_time = #{receiveTime},
| </if>
| update_time = #{updateTime}
| where id = #{id}
| </update>
|
| </mapper>
|
|