Browse Source

修复 监控

魏熙美 6 years ago
parent
commit
2d3b7860c6
20 changed files with 649 additions and 3 deletions
  1. 20
    0
      CODE/foreign-service/src/main/java/com/community/huiju/controller/TpConfigurationController.java
  2. 48
    0
      CODE/foreign-service/src/main/java/com/community/huiju/controller/TpEquipmentController.java
  3. 20
    0
      CODE/foreign-service/src/main/java/com/community/huiju/controller/TpEquipmentTreeController.java
  4. 16
    0
      CODE/foreign-service/src/main/java/com/community/huiju/dao/TpConfigurationMapper.java
  5. 37
    0
      CODE/foreign-service/src/main/java/com/community/huiju/dao/TpEquipmentMapper.java
  6. 16
    0
      CODE/foreign-service/src/main/java/com/community/huiju/dao/TpEquipmentTreeMapper.java
  7. 87
    0
      CODE/foreign-service/src/main/java/com/community/huiju/model/TpConfiguration.java
  8. 148
    0
      CODE/foreign-service/src/main/java/com/community/huiju/model/TpEquipment.java
  9. 94
    0
      CODE/foreign-service/src/main/java/com/community/huiju/model/TpEquipmentTree.java
  10. 16
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/ITpConfigurationService.java
  11. 26
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/ITpEquipmentService.java
  12. 16
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/ITpEquipmentTreeService.java
  13. 20
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TpConfigurationServiceImpl.java
  14. 47
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TpEquipmentServiceImpl.java
  15. 20
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TpEquipmentTreeServiceImpl.java
  16. 5
    0
      CODE/foreign-service/src/main/resources/mapper/TpConfigurationMapper.xml
  17. 5
    0
      CODE/foreign-service/src/main/resources/mapper/TpEquipmentMapper.xml
  18. 5
    0
      CODE/foreign-service/src/main/resources/mapper/TpEquipmentTreeMapper.xml
  19. 3
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpEquipmentMapper.java
  20. BIN
      CODE/smart-community/community-common/target/community-common-0.0.1.jar

+ 20
- 0
CODE/foreign-service/src/main/java/com/community/huiju/controller/TpConfigurationController.java View File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.huiju.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 设备配置表 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-16
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpConfigurationController extends BaseController {
19
+
20
+}

+ 48
- 0
CODE/foreign-service/src/main/java/com/community/huiju/controller/TpEquipmentController.java View File

@@ -0,0 +1,48 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.huiju.common.base.BaseController;
5
+import com.community.huiju.common.base.ResponseBean;
6
+import com.community.huiju.service.ITpEquipmentService;
7
+import io.swagger.annotations.Api;
8
+import io.swagger.annotations.ApiImplicitParam;
9
+import io.swagger.annotations.ApiImplicitParams;
10
+import io.swagger.annotations.ApiOperation;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.*;
13
+
14
+/**
15
+ * <p>
16
+ * 设备表 前端控制器
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2019-05-16
21
+ */
22
+@RestController
23
+@RequestMapping("/")
24
+@Api(value = "设备 API", description = "设备 API")
25
+public class TpEquipmentController extends BaseController {
26
+
27
+    @Autowired
28
+    private ITpEquipmentService iTpEquipmentService;
29
+
30
+
31
+    @ApiOperation(value = "获取监控列表数据 HLS",notes = "根据小区ID获取")
32
+    @ApiImplicitParams({
33
+            @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "communityId",value = "小区ID"),
34
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNo",value = "第几页"),
35
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize",value = "一页多少行")
36
+    })
37
+    @RequestMapping(value = "/equipment/monitoring/{communityId}",method = RequestMethod.GET)
38
+    public ResponseBean getListHLS(@PathVariable("communityId") Integer communityId,
39
+                                   @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
40
+                                   @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize) {
41
+
42
+        ResponseBean responseBean = new ResponseBean();
43
+        responseBean = iTpEquipmentService.getMonitoringByCommunityId(communityId, pageNo, pageSize);
44
+        return responseBean;
45
+    }
46
+
47
+
48
+}

+ 20
- 0
CODE/foreign-service/src/main/java/com/community/huiju/controller/TpEquipmentTreeController.java View File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.huiju.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 设备树 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-16
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpEquipmentTreeController extends BaseController {
19
+
20
+}

+ 16
- 0
CODE/foreign-service/src/main/java/com/community/huiju/dao/TpConfigurationMapper.java View File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpConfiguration;
5
+
6
+/**
7
+ * <p>
8
+ * 设备配置表 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-16
13
+ */
14
+public interface TpConfigurationMapper extends BaseMapper<TpConfiguration> {
15
+
16
+}

+ 37
- 0
CODE/foreign-service/src/main/java/com/community/huiju/dao/TpEquipmentMapper.java View File

@@ -0,0 +1,37 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.community.huiju.model.TpEquipment;
6
+import org.apache.ibatis.annotations.Param;
7
+import org.apache.ibatis.annotations.ResultMap;
8
+import org.apache.ibatis.annotations.ResultType;
9
+import org.apache.ibatis.annotations.Select;
10
+
11
+/**
12
+ * <p>
13
+ * 设备表 Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-05-16
18
+ */
19
+public interface TpEquipmentMapper extends BaseMapper<TpEquipment> {
20
+
21
+    /**
22
+     * 根据小区获取 监控列表 HLS
23
+     * @param communityId
24
+     * @return
25
+     */
26
+    @ResultType(TpEquipment.class)
27
+    @Select("select " +
28
+            "tm.*, " +
29
+            "(select `key` FROM tp_configuration WHERE id = tm.url_id) as monitoringUrl, " +
30
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_guard_tel_id) as securityGuardTel, " +
31
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_room_tel_id) as securityRoomTel, " +
32
+            "(select configuration_value FROM tp_configuration WHERE id = tm.address_id) as monitoringAddress " +
33
+            "FROM " +
34
+            "tp_equipment tm " +
35
+            "where tm.community_id = #{communityId} and tm.equipment_type = 1")
36
+    IPage<TpEquipment> selectMonitoringByCommunityId(IPage<TpEquipment> page, @Param("communityId") Integer communityId);
37
+}

+ 16
- 0
CODE/foreign-service/src/main/java/com/community/huiju/dao/TpEquipmentTreeMapper.java View File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpEquipmentTree;
5
+
6
+/**
7
+ * <p>
8
+ * 设备树 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-16
13
+ */
14
+public interface TpEquipmentTreeMapper extends BaseMapper<TpEquipmentTree> {
15
+
16
+}

+ 87
- 0
CODE/foreign-service/src/main/java/com/community/huiju/model/TpConfiguration.java View File

@@ -0,0 +1,87 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import lombok.Data;
6
+import lombok.EqualsAndHashCode;
7
+import lombok.experimental.Accessors;
8
+
9
+import java.io.Serializable;
10
+import java.time.LocalDateTime;
11
+import java.util.Date;
12
+
13
+/**
14
+ * <p>
15
+ * 设备配置表
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2019-05-16
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("tp_configuration")
25
+public class TpConfiguration implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * 配置key
31
+     */
32
+    private String key;
33
+
34
+    /**
35
+     * 配置项名称
36
+     */
37
+    private String configurationName;
38
+
39
+    /**
40
+     * 配置类型: 1字符串  2多列值
41
+     */
42
+    private Integer configurationType;
43
+
44
+    /**
45
+     * 配置值
46
+     */
47
+    private String configurationValue;
48
+
49
+    /**
50
+     * 创建时间
51
+     */
52
+    private Date createTiem;
53
+
54
+    /**
55
+     * 创建人
56
+     */
57
+    private Integer createUser;
58
+
59
+    /**
60
+     * 修改时间
61
+     */
62
+    private Date updateTime;
63
+
64
+    /**
65
+     * 修改人
66
+     */
67
+    private Integer updateUser;
68
+
69
+    /**
70
+     * 小区id
71
+     */
72
+    private Integer communityId;
73
+
74
+    /**
75
+     * 门禁点UUID
76
+     */
77
+    @TableField("doorUuid")
78
+    private String doorUuid;
79
+
80
+    /**
81
+     * 门禁设备UUID
82
+     */
83
+    @TableField("deviceUuid")
84
+    private String deviceUuid;
85
+
86
+
87
+}

+ 148
- 0
CODE/foreign-service/src/main/java/com/community/huiju/model/TpEquipment.java View File

@@ -0,0 +1,148 @@
1
+package com.community.huiju.model;
2
+
3
+import com.alibaba.fastjson.annotation.JSONField;
4
+import com.baomidou.mybatisplus.annotation.IdType;
5
+import com.baomidou.mybatisplus.annotation.TableField;
6
+import com.baomidou.mybatisplus.annotation.TableId;
7
+import com.baomidou.mybatisplus.annotation.TableName;
8
+import lombok.Data;
9
+import lombok.EqualsAndHashCode;
10
+import lombok.experimental.Accessors;
11
+
12
+import java.io.Serializable;
13
+import java.time.LocalDateTime;
14
+import java.util.Date;
15
+
16
+/**
17
+ * <p>
18
+ * 设备表
19
+ * </p>
20
+ *
21
+ * @author jobob
22
+ * @since 2019-05-16
23
+ */
24
+@Data
25
+@EqualsAndHashCode(callSuper = false)
26
+@Accessors(chain = true)
27
+@TableName("tp_equipment")
28
+public class TpEquipment implements Serializable {
29
+
30
+    private static final long serialVersionUID = 1L;
31
+
32
+    @TableId(value = "id", type = IdType.AUTO)
33
+    private Integer equipmentId;
34
+
35
+    /**
36
+     * 设备url地址,对应 配置tp_configuration 表id
37
+     */
38
+    private Integer urlId;
39
+
40
+    /**
41
+     * 小区id
42
+     */
43
+    private Integer communityId;
44
+
45
+    /**
46
+     * 安保人员电话,对应 配置tp_configuration 表id
47
+     */
48
+    private Integer securityGuardTelId;
49
+
50
+    /**
51
+     * 保安室电话,对应 配置tp_configuration 表id
52
+     */
53
+    private Integer securityRoomTelId;
54
+
55
+    /**
56
+     * 设备地址,对应 配置tp_configuration 表id
57
+     */
58
+    private Integer addressId;
59
+
60
+    /**
61
+     * 创建时间
62
+     */
63
+    private Date createTime;
64
+
65
+    /**
66
+     * 创建人
67
+     */
68
+    private Integer createUser;
69
+
70
+    /**
71
+     * 修改时间
72
+     */
73
+    private Date updateTime;
74
+
75
+    /**
76
+     * 修改人
77
+     */
78
+    private Integer updateUser;
79
+
80
+    /**
81
+     * 设备UUID ,对应 配置tp_configuration 表id
82
+     */
83
+    private Integer uuidId;
84
+
85
+    /**
86
+     * 设备类型,1 监控 2 访客机 3 可是对讲 4 门禁设备(看字典表)
87
+     */
88
+    private String equipmentType;
89
+
90
+    /**
91
+     * 设备树id,对应 tp_equipment_tree 表id
92
+     */
93
+    private Integer equipmentTreeId;
94
+
95
+    /**
96
+     * appkey(第三方平台)
97
+     */
98
+    @JSONField(serialize = false)
99
+    private String appkey;
100
+
101
+    /**
102
+     * secret(第三方平台)
103
+     */
104
+    @JSONField(serialize = false)
105
+    private String secret;
106
+
107
+    /**
108
+     * op_user_uuid(第三方平台操作人员uuid)
109
+     */
110
+    @JSONField(serialize = false)
111
+    private String opUserUuid;
112
+
113
+    /**
114
+     * http_server第三方服务器请求地址
115
+     */
116
+    @JSONField(serialize = false)
117
+    private String httpServer;
118
+
119
+    /**
120
+     * unit_uuids组织中心
121
+     */
122
+    @JSONField(serialize = false)
123
+    private String unitUuids;
124
+
125
+    /**
126
+     * 监控URL
127
+     */
128
+    @TableField(exist = false)
129
+    private String monitoringUrl;
130
+
131
+    /**
132
+     * 保安人员电话
133
+     */
134
+    @TableField(exist = false)
135
+    private String securityGuardTel;
136
+
137
+    /**
138
+     * 安保室电话
139
+     */
140
+    @TableField(exist = false)
141
+    private String securityRoomTel;
142
+
143
+    /**
144
+     * 监控地址
145
+     */
146
+    @TableField(exist = false)
147
+    private String monitoringAddress;
148
+}

+ 94
- 0
CODE/foreign-service/src/main/java/com/community/huiju/model/TpEquipmentTree.java View File

@@ -0,0 +1,94 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import lombok.Data;
5
+import lombok.EqualsAndHashCode;
6
+import lombok.experimental.Accessors;
7
+
8
+import java.io.Serializable;
9
+import java.time.LocalDateTime;
10
+import java.util.Date;
11
+
12
+/**
13
+ * <p>
14
+ * 设备树
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-05-16
19
+ */
20
+@Data
21
+@EqualsAndHashCode(callSuper = false)
22
+@Accessors(chain = true)
23
+@TableName("tp_equipment_tree")
24
+public class TpEquipmentTree implements Serializable {
25
+
26
+    private static final long serialVersionUID = 1L;
27
+
28
+    /**
29
+     * 小区id
30
+     */
31
+    private Integer communityId;
32
+
33
+    /**
34
+     * 名称
35
+     */
36
+    private String equipmentName;
37
+
38
+    /**
39
+     * 父节点id
40
+     */
41
+    private Integer pid;
42
+
43
+    /**
44
+     * 排序
45
+     */
46
+    private Integer sort;
47
+
48
+    /**
49
+     * 创建时间
50
+     */
51
+    private Date createTime;
52
+
53
+    /**
54
+     * 创建人
55
+     */
56
+    private Integer createUser;
57
+
58
+    /**
59
+     * 修改时间
60
+     */
61
+    private Date updateTime;
62
+
63
+    /**
64
+     * 修改人
65
+     */
66
+    private Integer updateUser;
67
+
68
+    /**
69
+     * appkey(第三方平台)
70
+     */
71
+    private String appkey;
72
+
73
+    /**
74
+     * secret(第三方平台)
75
+     */
76
+    private String secret;
77
+
78
+    /**
79
+     * 第三方平台操作人员uuid
80
+     */
81
+    private String opUserUuid;
82
+
83
+    /**
84
+     * 第三方平台请求地址
85
+     */
86
+    private String httpServer;
87
+
88
+    /**
89
+     * 组织中心(简称区域编号)
90
+     */
91
+    private String unitUuids;
92
+
93
+
94
+}

+ 16
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/ITpConfigurationService.java View File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TpConfiguration;
5
+
6
+/**
7
+ * <p>
8
+ * 设备配置表 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-16
13
+ */
14
+public interface ITpConfigurationService extends IService<TpConfiguration> {
15
+
16
+}

+ 26
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/ITpEquipmentService.java View File

@@ -0,0 +1,26 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.common.base.ResponseBean;
5
+import com.community.huiju.model.TpEquipment;
6
+
7
+/**
8
+ * <p>
9
+ * 设备表 服务类
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-05-16
14
+ */
15
+public interface ITpEquipmentService extends IService<TpEquipment> {
16
+
17
+    /**
18
+     * 获取监控列表
19
+     * @param communityId
20
+     * @param pageNum
21
+     * @param pageSize
22
+     * @return
23
+     */
24
+    ResponseBean getMonitoringByCommunityId(Integer communityId, Integer pageNum, Integer pageSize);
25
+
26
+}

+ 16
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/ITpEquipmentTreeService.java View File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TpEquipmentTree;
5
+
6
+/**
7
+ * <p>
8
+ * 设备树 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-16
13
+ */
14
+public interface ITpEquipmentTreeService extends IService<TpEquipmentTree> {
15
+
16
+}

+ 20
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TpConfigurationServiceImpl.java View File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.model.TpConfiguration;
5
+import com.community.huiju.dao.TpConfigurationMapper;
6
+import com.community.huiju.service.ITpConfigurationService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 设备配置表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-16
16
+ */
17
+@Service
18
+public class TpConfigurationServiceImpl extends ServiceImpl<TpConfigurationMapper, TpConfiguration> implements ITpConfigurationService {
19
+
20
+}

+ 47
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TpEquipmentServiceImpl.java View File

@@ -0,0 +1,47 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6
+import com.community.huiju.common.base.ResponseBean;
7
+import com.community.huiju.model.TpEquipment;
8
+import com.community.huiju.dao.TpEquipmentMapper;
9
+import com.community.huiju.service.ITpEquipmentService;
10
+import com.google.common.collect.Maps;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.stereotype.Service;
13
+
14
+import java.util.List;
15
+import java.util.Map;
16
+
17
+/**
18
+ * <p>
19
+ * 设备表 服务实现类
20
+ * </p>
21
+ *
22
+ * @author jobob
23
+ * @since 2019-05-16
24
+ */
25
+@Service
26
+public class TpEquipmentServiceImpl extends ServiceImpl<TpEquipmentMapper, TpEquipment> implements ITpEquipmentService {
27
+
28
+    @Autowired
29
+    private TpEquipmentMapper tpEquipmentMapper;
30
+
31
+    @Override
32
+    public ResponseBean getMonitoringByCommunityId(Integer communityId, Integer pageNum, Integer pageSize) {
33
+        ResponseBean responseBean = new ResponseBean();
34
+        IPage<TpEquipment> page = new Page<>();
35
+        page.setCurrent(pageNum);
36
+        page.setSize(pageSize);
37
+        IPage<TpEquipment> equipmentIPage = tpEquipmentMapper.selectMonitoringByCommunityId(page,communityId);
38
+
39
+        Map<String, Object> map = Maps.newHashMap();
40
+        map.put("pageNum", equipmentIPage.getCurrent());
41
+        map.put("pageSize", equipmentIPage.getSize());
42
+        map.put("total", equipmentIPage.getTotal());
43
+        map.put("list", equipmentIPage.getRecords());
44
+        responseBean.addSuccess(map);
45
+        return responseBean;
46
+    }
47
+}

+ 20
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TpEquipmentTreeServiceImpl.java View File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.model.TpEquipmentTree;
5
+import com.community.huiju.dao.TpEquipmentTreeMapper;
6
+import com.community.huiju.service.ITpEquipmentTreeService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 设备树 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-16
16
+ */
17
+@Service
18
+public class TpEquipmentTreeServiceImpl extends ServiceImpl<TpEquipmentTreeMapper, TpEquipmentTree> implements ITpEquipmentTreeService {
19
+
20
+}

+ 5
- 0
CODE/foreign-service/src/main/resources/mapper/TpConfigurationMapper.xml View File

@@ -0,0 +1,5 @@
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.community.huiju.dao.TpConfigurationMapper">
4
+
5
+</mapper>

+ 5
- 0
CODE/foreign-service/src/main/resources/mapper/TpEquipmentMapper.xml View File

@@ -0,0 +1,5 @@
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.community.huiju.dao.TpEquipmentMapper">
4
+
5
+</mapper>

+ 5
- 0
CODE/foreign-service/src/main/resources/mapper/TpEquipmentTreeMapper.xml View File

@@ -0,0 +1,5 @@
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.community.huiju.dao.TpEquipmentTreeMapper">
4
+
5
+</mapper>

+ 3
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpEquipmentMapper.java View File

@@ -45,9 +45,9 @@ public interface TpEquipmentMapper {
45 45
     @Select("select " +
46 46
             "tm.*, " +
47 47
             "(select `key` FROM tp_configuration WHERE id = tm.url_id) as monitoringUrl, " +
48
-            "(select `key` FROM tp_configuration WHERE id = tm.security_guard_tel_id) as securityGuardTel, " +
49
-            "(select `key` FROM tp_configuration WHERE id = tm.security_room_tel_id) as securityRoomTel, " +
50
-            "(select `key` FROM tp_configuration WHERE id = tm.address_id) as monitoringAddress " +
48
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_guard_tel_id) as securityGuardTel, " +
49
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_room_tel_id) as securityRoomTel, " +
50
+            "(select configuration_value FROM tp_configuration WHERE id = tm.address_id) as monitoringAddress " +
51 51
             "FROM " +
52 52
             "tp_equipment tm " +
53 53
             "where tm.community_id = #{communityId} and tm.equipment_type = 1")

BIN
CODE/smart-community/community-common/target/community-common-0.0.1.jar View File