Browse Source

大苏接口 监控数据

魏熙美 6 years ago
parent
commit
6620338318

+ 4
- 2
CODE/foreign-service/src/main/java/com/community/huiju/common/sign/DaSuSign.java View File

78
         System.out.println(timeMillis);
78
         System.out.println(timeMillis);
79
         TreeMap<String, Object> treeMap = new TreeMap<>();
79
         TreeMap<String, Object> treeMap = new TreeMap<>();
80
         treeMap.put("appid", "dssdw2576sd997");
80
         treeMap.put("appid", "dssdw2576sd997");
81
-        treeMap.put("datetime","1560223595398");
81
+        treeMap.put("datetime",timeMillis);
82
         treeMap.put("encrypt", "md5");
82
         treeMap.put("encrypt", "md5");
83
-        treeMap.put("communityId", "107");
83
+        //treeMap.put("communityId", "107");
84
+        treeMap.put("pageNo", 1);
85
+        treeMap.put("pageSize", 10);
84
         //treeMap.put("carNo","苏A90GM7");
86
         //treeMap.put("carNo","苏A90GM7");
85
         String sign = createSign(treeMap, "fgexhd855sf4");
87
         String sign = createSign(treeMap, "fgexhd855sf4");
86
     }
88
     }

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

28
     @ResultType(TpEquipment.class)
28
     @ResultType(TpEquipment.class)
29
     @Select("select " +
29
     @Select("select " +
30
             "tm.*, " +
30
             "tm.*, " +
31
-            "(select `key` FROM tp_configuration WHERE id = tm.url_id) as monitoringUrl, " +
31
+            "(select configuration_value FROM tp_configuration WHERE id = tm.url_id) as monitoringUrl, " +
32
             "(select configuration_value FROM tp_configuration WHERE id = tm.security_guard_tel_id) as securityGuardTel, " +
32
             "(select configuration_value FROM tp_configuration WHERE id = tm.security_guard_tel_id) as securityGuardTel, " +
33
             "(select configuration_value FROM tp_configuration WHERE id = tm.security_room_tel_id) as securityRoomTel, " +
33
             "(select configuration_value FROM tp_configuration WHERE id = tm.security_room_tel_id) as securityRoomTel, " +
34
             "(select configuration_value FROM tp_configuration WHERE id = tm.address_id) as monitoringAddress " +
34
             "(select configuration_value FROM tp_configuration WHERE id = tm.address_id) as monitoringAddress " +

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

13
 
13
 
14
 import java.util.List;
14
 import java.util.List;
15
 import java.util.Map;
15
 import java.util.Map;
16
+import java.util.stream.Collectors;
16
 
17
 
17
 /**
18
 /**
18
  * <p>
19
  * <p>
35
         page.setCurrent(pageNum);
36
         page.setCurrent(pageNum);
36
         page.setSize(pageSize);
37
         page.setSize(pageSize);
37
         IPage<TpEquipment> equipmentIPage = tpEquipmentMapper.selectMonitoringByCommunityId(page,communityId);
38
         IPage<TpEquipment> equipmentIPage = tpEquipmentMapper.selectMonitoringByCommunityId(page,communityId);
39
+        List<TpEquipment> records = equipmentIPage.getRecords();
40
+        records = records.stream().filter(e-> e.getMonitoringUrl().contains("m3u8")).collect(Collectors.toList());
38
 
41
 
39
         Map<String, Object> map = Maps.newHashMap();
42
         Map<String, Object> map = Maps.newHashMap();
40
         map.put("pageNum", equipmentIPage.getCurrent());
43
         map.put("pageNum", equipmentIPage.getCurrent());
41
         map.put("pageSize", equipmentIPage.getSize());
44
         map.put("pageSize", equipmentIPage.getSize());
42
         map.put("total", equipmentIPage.getTotal());
45
         map.put("total", equipmentIPage.getTotal());
43
-        map.put("list", equipmentIPage.getRecords());
46
+        map.put("list", records);
44
         responseBean.addSuccess(map);
47
         responseBean.addSuccess(map);
45
         return responseBean;
48
         return responseBean;
46
     }
49
     }