ソースを参照

Merge branch 'dev-V0.4.5' of https://gitee.com/iotkit-open-source/iotkit-parent into dev-V0.4.5

荭琪枫 2 年 前
コミット
6cf1b30503
21 ファイル変更332 行追加212 行削除
  1. 280 140
      data/init/deviceInfo.json
  2. 2 2
      iot-common/iot-common-core/src/main/java/cc/iotkit/common/utils/JsonUtils.java
  3. 0 4
      iot-common/iot-common-core/src/main/java/cc/iotkit/common/utils/file/FileUtils.java
  4. 3 2
      iot-common/iot-common-dao/iot-data-service/src/main/java/cc/iotkit/data/IOwnedData.java
  5. 15 20
      iot-common/iot-common-dao/iot-data-serviceImpl-rdb/pom.xml
  6. 0 1
      iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/config/AutoMapperConfig3.java
  7. 0 4
      iot-common/iot-common-dao/iot-temporal-serviceImpl-es/pom.xml
  8. 1 3
      iot-common/iot-common-dao/iot-temporal-serviceImpl-es/src/main/java/cc/iotkit/temporal/es/service/VirtualDeviceLogDataImpl.java
  9. 0 4
      iot-common/iot-common-dao/iot-temporal-serviceImpl-ts/pom.xml
  10. 1 1
      iot-common/iot-common-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/service/VirtualDeviceLogDataImpl.java
  11. 0 13
      iot-common/iot-common-dao/pom.xml
  12. 3 2
      iot-common/iot-common-excel/src/main/java/cc/iotkit/common/excel/core/DefaultExcelListener.java
  13. 2 1
      iot-common/iot-common-excel/src/main/java/cc/iotkit/common/excel/core/DefaultExcelResult.java
  14. 3 3
      iot-common/iot-common-web/src/main/java/cc/iotkit/common/web/utils/UnsignedMathGenerator.java
  15. 1 3
      iot-common/iot-message-bus/iot-message-event-bus/src/main/java/cc/iotkit/vertx/VertxMqConsumer.java
  16. 1 6
      iot-common/iot-message-bus/iot-message-event-bus/src/main/java/cc/iotkit/vertx/VertxMqProducer.java
  17. 6 0
      iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/DeviceController.java
  18. 3 1
      iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/device/DeviceInfoBo.java
  19. 2 0
      iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/IDeviceService.java
  20. 8 0
      iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/impl/DeviceServiceImpl.java
  21. 1 2
      项目规范.md

+ 280 - 140
data/init/deviceInfo.json

@@ -7,8 +7,10 @@
     "secret": "rMAweEJrE7cxbQWa",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655415536032
@@ -35,8 +37,10 @@
     "secret": "eN4PjDhH4yx4mrmi",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655415536130
@@ -63,8 +67,10 @@
     "secret": "ePSkE7bzGMsR6rTs",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655415536135
@@ -91,8 +97,10 @@
     "secret": "mkQiSDk4rF3EWKFM",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655416465031
@@ -122,8 +130,10 @@
     "secret": "p72KAZyTA42zi8cJ",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655416465035
@@ -149,8 +159,10 @@
     "secret": "xnKZZyPKj2rH6ee3",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655416465133
@@ -180,8 +192,10 @@
     "secret": "PDkTxHPfw2H4WZjQ",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655416465231
@@ -207,8 +221,10 @@
     "secret": "3KdPNBKZEyDGaNYK",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652738672
@@ -234,8 +250,10 @@
     "secret": "TBwbHJdJBQCpGdHi",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652738676
@@ -261,8 +279,10 @@
     "secret": "86pTYbQxxX3wd2FR",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652738773
@@ -288,8 +308,10 @@
     "secret": "FtxYcTM5p6B5GyPk",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652738872
@@ -315,8 +337,10 @@
     "secret": "5yHFHseBHDbCK3eZ",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652738972
@@ -342,8 +366,10 @@
     "secret": "pGC4z4TrbjZhii2m",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652739072
@@ -369,8 +395,10 @@
     "secret": "HMxT2rQ55bzeRNJx",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652739076
@@ -396,8 +424,10 @@
     "secret": "Z6yMp6D6mHKMjFi7",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652739174
@@ -423,8 +453,10 @@
     "secret": "Ek3ZjwPayCymDxhN",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652739272
@@ -450,8 +482,10 @@
     "secret": "NnnHaibdHJXMxNbC",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655652739372
@@ -477,8 +511,10 @@
     "secret": "bWkiEmY6wKM8WQP5",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false
     },
@@ -499,8 +535,10 @@
     "subUid": [
       "04c6722f-9a6d-40f3-ac9b-cd791b4c8933"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839933067
@@ -537,8 +575,10 @@
     "secret": "CN8ZGpcAheAbsDn2",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839933167
@@ -558,8 +598,10 @@
     "secret": "S4SDRKscRXAn43bc",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839933267
@@ -585,8 +627,10 @@
     "secret": "7N4S6eYzMCjA7YfK",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839933367
@@ -606,8 +650,10 @@
     "secret": "Jm7ecfyXawiend8K",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839933376
@@ -633,8 +679,10 @@
     "secret": "rtsZbST3tiJHccbe",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839933474
@@ -660,8 +708,10 @@
     "secret": "PXHwHXH4a8YJzZ3S",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839918667
@@ -689,8 +739,10 @@
     "secret": "BQj5SZetsC3eGtfM",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839918676
@@ -718,8 +770,10 @@
     "secret": "mbs4PsY4atEtzcA3",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839918771
@@ -747,8 +801,10 @@
     "secret": "4nrNrjnFMSQZB562",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839918871
@@ -776,8 +832,10 @@
     "secret": "Js66kBbXRjXmcpMB",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839918967
@@ -799,8 +857,10 @@
     "secret": "pGxKYrNJC7rDhsr8",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655416485331
@@ -820,8 +880,10 @@
     "secret": "ZxDQeQ8jhMrfx8eE",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655416485335
@@ -841,8 +903,10 @@
     "secret": "fEbdXEayedpBx6wk",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655416485433
@@ -862,8 +926,10 @@
     "secret": "Crm28CTD6iw7hYw5",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655416485531
@@ -883,8 +949,10 @@
     "secret": "FkCQGREXYCmjzxaZ",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655416485631
@@ -904,8 +972,10 @@
     "secret": "JwKxnDWGrRcP8xAJ",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839919567
@@ -925,8 +995,10 @@
     "secret": "xrX2mrkQwf3YYaWc",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839919576
@@ -946,8 +1018,10 @@
     "secret": "diRBkEREDt47MzWF",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839919673
@@ -967,8 +1041,10 @@
     "secret": "fR3R3i8BYDKWAiDj",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false
     },
@@ -984,8 +1060,10 @@
     "secret": "t3NYS5p7ExYaWKx4",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false
     },
@@ -1001,8 +1079,10 @@
     "secret": "KSpeRjXRP8H7tcAn",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false
     },
@@ -1018,8 +1098,10 @@
     "secret": "DSBbhJW7cGXRWeZA",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839926671
@@ -1039,8 +1121,10 @@
     "secret": "5bm8pNYcdj7YPMXn",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839926777
@@ -1060,8 +1144,10 @@
     "secret": "neSfPnhsjCsQiCQx",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653839927067
@@ -1081,8 +1167,10 @@
     "secret": "2D2k8mmHbi2AMh8G",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653785231385
@@ -1103,8 +1191,10 @@
     "secret": "AQHQJTQ2iXkncb3C",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653785231786
@@ -1125,8 +1215,10 @@
     "secret": "PwYEKSARBJjD4y6B",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653785232184
@@ -1147,8 +1239,10 @@
     "secret": "C8YxCycFFeQDPKX4",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653730979070
@@ -1170,8 +1264,10 @@
     "parentId": "16514626212240aabbccee01000000143",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653380321483
@@ -1195,8 +1291,10 @@
     "model": "GW01",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false,
       "onlineTime": 1653185932725,
@@ -1215,8 +1313,10 @@
     "parentId": "16514626212240aabbccee01000000143",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653380322090,
@@ -1238,8 +1338,10 @@
     "parentId": "16514626212240aabbccee01000000143",
     "uid": "15620886-b30d-439d-9e5f-13a094c1f1f9",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653380319984,
@@ -1261,8 +1363,10 @@
     "parentId": "16514626212240aabbccee01000000143",
     "uid": "15620886-b30d-439d-9e5f-13a094c1f1f9",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653380317469,
@@ -1282,8 +1386,10 @@
     "deviceName": "AA:BB:CC:EE:01",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653380312358,
@@ -1304,8 +1410,10 @@
     "parentId": "165017126122400cefafcfee61000012b",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655415536433,
@@ -1337,8 +1445,10 @@
     "subUid": [
       "04c6722f-9a6d-40f3-ac9b-cd791b4c8933"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false,
       "onlineTime": 1652602130873,
@@ -1376,8 +1486,10 @@
     "subUid": [
       "04c6722f-9a6d-40f3-ac9b-cd791b4c8933"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false,
       "onlineTime": 1652602115884,
@@ -1413,8 +1525,10 @@
     "subUid": [
       "629daa3de5a005209d182876"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655581924548,
@@ -1448,8 +1562,10 @@
     "subUid": [
       "629daa3de5a005209d182876"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655581925148,
@@ -1485,8 +1601,10 @@
     "subUid": [
       "629daa3de5a005209d182876"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655581925152,
@@ -1522,8 +1640,10 @@
     "subUid": [
       "629daa3de5a005209d182876"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655581925157,
@@ -1559,8 +1679,10 @@
     "subUid": [
       "629daa3de5a005209d182876"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655581925252,
@@ -1596,8 +1718,10 @@
     "subUid": [
       "629daa3de5a005209d182876"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655581925255,
@@ -1633,8 +1757,10 @@
     "subUid": [
       "629daa3de5a005209d182876"
     ],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1655581925247,
@@ -1669,8 +1795,10 @@
     "parentId": "16465226744430aabbccdd22000000143",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false,
       "onlineTime": 1653380311848,
@@ -1693,8 +1821,10 @@
     "parentId": "16465226744430aabbccdd22000000143",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false,
       "onlineTime": 1653380308883,
@@ -1715,8 +1845,10 @@
     "parentId": "16465226744430aabbccdd22000000143",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653729780071,
@@ -1738,8 +1870,10 @@
     "parentId": "16465226744430aabbccdd22000000143",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": true,
       "onlineTime": 1653729780174,
@@ -1759,8 +1893,10 @@
     "deviceName": "AA:BB:CC:DD:22",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false,
       "onlineTime": 1653380299997,
@@ -1777,8 +1913,10 @@
     "deviceName": "123456789123",
     "uid": "1",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false,
       "onlineTime": 1653380299997,
@@ -1796,8 +1934,10 @@
     "uid": "1",
     "parentId": "168187356997901234567891230000120",
     "subUid": [],
-    "longitude": "104.090377",
-    "latitude": "30.604218",
+    "locate":{
+      "longitude": "104.090377",
+      "latitude": "30.604218"
+    },
     "state": {
       "online": false,
       "onlineTime": 1653380299997,

+ 2 - 2
iot-common/iot-common-core/src/main/java/cc/iotkit/common/utils/JsonUtils.java

@@ -1,8 +1,8 @@
 package cc.iotkit.common.utils;
 
 import cn.hutool.core.lang.Dict;
-import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.PrimitiveArrayUtil;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -61,7 +61,7 @@ public class JsonUtils {
     }
 
     public static <T> T parseObject(byte[] bytes, Class<T> clazz) {
-        if (ArrayUtil.isEmpty(bytes)) {
+        if (PrimitiveArrayUtil.isEmpty(bytes)) {
             return null;
         }
         try {

+ 0 - 4
iot-common/iot-common-core/src/main/java/cc/iotkit/common/utils/file/FileUtils.java

@@ -4,10 +4,6 @@ import cn.hutool.core.io.FileUtil;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 
-
-import java.net.URLEncoder;
-import java.nio.charset.StandardCharsets;
-
 /**
  * 文件处理工具类
  *

+ 3 - 2
iot-common/iot-common-dao/iot-data-service/src/main/java/cc/iotkit/data/IOwnedData.java

@@ -22,9 +22,10 @@ public interface IOwnedData<T extends Owned<ID>, ID> extends ICommonData<T, ID>
 
     /**
      * 按所属用户取数据
+     * @return
      */
-    default List<T> findByUid(String uid) {
-        return Collections.EMPTY_LIST;
+    default List findByUid(String uid) {
+        return Collections.emptyList();
 
     }
 

+ 15 - 20
iot-common/iot-common-dao/iot-data-serviceImpl-rdb/pom.xml

@@ -58,11 +58,6 @@
         </dependency>
 
 
-<!--        <dependency>-->
-<!--            <groupId>io.github.linpeilie</groupId>-->
-<!--            <artifactId>mapstruct-plus</artifactId>-->
-<!--        </dependency>-->
-
         <dependency>
             <groupId>io.github.linpeilie</groupId>
             <artifactId>mapstruct-plus-spring-boot-starter</artifactId>
@@ -106,21 +101,21 @@
                     <source>${java.version}</source> <!-- depending on your project -->
                     <target>${java.version}</target> <!-- depending on your project -->
                     <annotationProcessorPaths>
-                       <path>
-                        <groupId>org.projectlombok</groupId>
-                        <artifactId>lombok</artifactId>
-                           <version>${lombok.version}</version>
-                    </path>
-                    <path>
-                        <groupId>io.github.linpeilie</groupId>
-                        <artifactId>mapstruct-plus-processor</artifactId>
-                        <version>${mapstruct-plus.version}</version>
-                    </path>
-                    <path>
-                        <groupId>org.projectlombok</groupId>
-                        <artifactId>lombok-mapstruct-binding</artifactId>
-                        <version>0.2.0</version>
-                    </path>
+                        <path>
+                            <groupId>org.projectlombok</groupId>
+                            <artifactId>lombok</artifactId>
+                            <version>${lombok.version}</version>
+                        </path>
+                        <path>
+                            <groupId>io.github.linpeilie</groupId>
+                            <artifactId>mapstruct-plus-processor</artifactId>
+                            <version>${mapstruct-plus.version}</version>
+                        </path>
+                        <path>
+                            <groupId>org.projectlombok</groupId>
+                            <artifactId>lombok-mapstruct-binding</artifactId>
+                            <version>0.2.0</version>
+                        </path>
 
                         <!-- other annotation processors -->
                     </annotationProcessorPaths>

+ 0 - 1
iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/config/AutoMapperConfig3.java

@@ -1,6 +1,5 @@
 package cc.iotkit.data.config;
 
-import io.github.linpeilie.annotations.ComponentModelConfig;
 import io.github.linpeilie.annotations.MapperConfig;
 
 /**

+ 0 - 4
iot-common/iot-common-dao/iot-temporal-serviceImpl-es/pom.xml

@@ -29,10 +29,6 @@
             <artifactId>jackson-annotations</artifactId>
         </dependency>
 
-<!--        <dependency>-->
-<!--            <groupId>io.github.linpeilie</groupId>-->
-<!--            <artifactId>mapstruct-plus</artifactId>-->
-<!--        </dependency>-->
         <dependency>
             <groupId>io.github.linpeilie</groupId>
             <artifactId>mapstruct-plus-spring-boot-starter</artifactId>

+ 1 - 3
iot-common/iot-common-dao/iot-temporal-serviceImpl-es/src/main/java/cc/iotkit/temporal/es/service/VirtualDeviceLogDataImpl.java

@@ -35,9 +35,7 @@ public class VirtualDeviceLogDataImpl implements IVirtualDeviceLogData {
                 .findByVirtualDeviceId(virtualDeviceId,
                         Pageable.ofSize(size).withPage(page - 1));
         return new Paging<>(paged.getTotalElements(), paged.getContent().stream()
-                .map(o -> {
-                    return MapstructUtils.convert(o, VirtualDeviceLog.class);
-                })
+                .map(o -> MapstructUtils.convert(o, VirtualDeviceLog.class))
                 .collect(Collectors.toList()));
     }
 

+ 0 - 4
iot-common/iot-common-dao/iot-temporal-serviceImpl-ts/pom.xml

@@ -44,10 +44,6 @@
             <artifactId>jackson-annotations</artifactId>
         </dependency>
 
-<!--        <dependency>-->
-<!--            <groupId>org.mapstruct</groupId>-->
-<!--            <artifactId>mapstruct</artifactId>-->
-<!--        </dependency>-->
 
         <dependency>
             <groupId>cn.hutool</groupId>

+ 1 - 1
iot-common/iot-common-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/service/VirtualDeviceLogDataImpl.java

@@ -36,7 +36,7 @@ public class VirtualDeviceLogDataImpl implements IVirtualDeviceLogData {
         sql = "select count(*) from virtual_device_log_" + virtualDeviceId.toLowerCase();
         List<Long> counts = tdTemplate.queryForList(sql, Long.class);
 
-        return new Paging<>(counts.size() > 0 ? counts.get(0) : 0, logs.stream().map(r ->
+        return new Paging<>(!counts.isEmpty() ? counts.get(0) : 0, logs.stream().map(r ->
                 new VirtualDeviceLog(r.getTime().toString(), virtualDeviceId,
                         r.getVirtualDeviceName(),
                         r.getDeviceTotal(), r.getResult(),

+ 0 - 13
iot-common/iot-common-dao/pom.xml

@@ -22,7 +22,6 @@
         <module>iot-data-serviceImpl-rdb</module>
         <module>iot-temporal-service</module>
         <module>iot-temporal-serviceImpl-es</module>
-        <!--<module>iot-temporal-serviceImpl-ts</module>-->
         <module>iot-temproal-serviceImpl-td</module>
     </modules>
 
@@ -32,18 +31,6 @@
 
         <dependencies>
 
-<!--            <dependency>-->
-<!--                <groupId>org.mapstruct</groupId>-->
-<!--                <artifactId>mapstruct</artifactId>-->
-<!--                <version>1.4.2.Final</version>-->
-<!--            </dependency>-->
-
-<!--            <dependency>-->
-<!--                <groupId>org.mapstruct</groupId>-->
-<!--                <artifactId>mapstruct-processor</artifactId>-->
-<!--                <version>1.4.2.Final</version>-->
-<!--            </dependency>-->
-
         </dependencies>
 
     </dependencyManagement>

+ 3 - 2
iot-common/iot-common-excel/src/main/java/cc/iotkit/common/excel/core/DefaultExcelListener.java

@@ -3,6 +3,7 @@ package cc.iotkit.common.excel.core;
 import cc.iotkit.common.utils.JsonUtils;
 import cc.iotkit.common.utils.StreamUtils;
 import cc.iotkit.common.utils.ValidatorUtils;
+import cn.hutool.core.text.CharSequenceUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.excel.context.AnalysisContext;
 import com.alibaba.excel.event.AnalysisEventListener;
@@ -60,7 +61,7 @@ public class DefaultExcelListener<T> extends AnalysisEventListener<T> implements
             // 如果是某一个单元格的转换异常 能获取到具体行号
             Integer rowIndex = excelDataConvertException.getRowIndex();
             Integer columnIndex = excelDataConvertException.getColumnIndex();
-            errMsg = StrUtil.format("第{}行-第{}列-表头{}: 解析异常<br/>",
+            errMsg = CharSequenceUtil.format("第{}行-第{}列-表头{}: 解析异常<br/>",
                     rowIndex + 1, columnIndex + 1, headMap.get(columnIndex));
             if (log.isDebugEnabled()) {
                 log.error(errMsg);
@@ -70,7 +71,7 @@ public class DefaultExcelListener<T> extends AnalysisEventListener<T> implements
             ConstraintViolationException constraintViolationException = (ConstraintViolationException) exception;
             Set<ConstraintViolation<?>> constraintViolations = constraintViolationException.getConstraintViolations();
             String constraintViolationsMsg = StreamUtils.join(constraintViolations, ConstraintViolation::getMessage, ", ");
-            errMsg = StrUtil.format("第{}行数据校验异常: {}", context.readRowHolder().getRowIndex() + 1, constraintViolationsMsg);
+            errMsg = CharSequenceUtil.format("第{}行数据校验异常: {}", context.readRowHolder().getRowIndex() + 1, constraintViolationsMsg);
             if (log.isDebugEnabled()) {
                 log.error(errMsg);
             }

+ 2 - 1
iot-common/iot-common-excel/src/main/java/cc/iotkit/common/excel/core/DefaultExcelResult.java

@@ -1,5 +1,6 @@
 package cc.iotkit.common.excel.core;
 
+import cn.hutool.core.text.CharSequenceUtil;
 import cn.hutool.core.util.StrUtil;
 import lombok.Setter;
 
@@ -64,7 +65,7 @@ public class DefaultExcelResult<T> implements ExcelResult<T> {
             return "读取失败,未解析到数据";
         } else {
             if (errorCount == 0) {
-                return StrUtil.format("恭喜您,全部读取成功!共{}条", successCount);
+                return CharSequenceUtil.format("恭喜您,全部读取成功!共{}条", successCount);
             } else {
                 return "";
             }

+ 3 - 3
iot-common/iot-common-web/src/main/java/cc/iotkit/common/web/utils/UnsignedMathGenerator.java

@@ -3,7 +3,7 @@ package cc.iotkit.common.web.utils;
 import cc.iotkit.common.utils.StringUtils;
 import cn.hutool.captcha.generator.CodeGenerator;
 import cn.hutool.core.math.Calculator;
-import cn.hutool.core.util.CharUtil;
+import cn.hutool.core.text.CharPool;
 import cn.hutool.core.util.RandomUtil;
 
 /**
@@ -44,8 +44,8 @@ public class UnsignedMathGenerator implements CodeGenerator {
         int b = RandomUtil.randomInt(limit);
         String max = Integer.toString(Math.max(a,b));
         String min = Integer.toString(Math.min(a,b));
-        max = StringUtils.rightPad(max, this.numberLength, CharUtil.SPACE);
-        min = StringUtils.rightPad(min, this.numberLength, CharUtil.SPACE);
+        max = StringUtils.rightPad(max, this.numberLength, CharPool.SPACE);
+        min = StringUtils.rightPad(min, this.numberLength, CharPool.SPACE);
 
         return max + RandomUtil.randomChar(OPERATORS) + min + '=';
     }

+ 1 - 3
iot-common/iot-message-bus/iot-message-event-bus/src/main/java/cc/iotkit/vertx/VertxMqConsumer.java

@@ -30,9 +30,7 @@ public class VertxMqConsumer<T> implements MqConsumer<T> {
     @SneakyThrows
     public VertxMqConsumer(Class<T> cls) {
         consumerVerticle = new MqConsumerVerticle<>(cls);
-        VertxManager.getVertx().deployVerticle(consumerVerticle, stringAsyncResult -> {
-            countDownLatch.countDown();
-        });
+        VertxManager.getVertx().deployVerticle(consumerVerticle, stringAsyncResult -> countDownLatch.countDown());
         //等待初始化穿完成
         countDownLatch.await();
     }

+ 1 - 6
iot-common/iot-message-bus/iot-message-event-bus/src/main/java/cc/iotkit/vertx/VertxMqProducer.java

@@ -21,12 +21,7 @@ public class VertxMqProducer<T> implements MqProducer<T> {
     @SneakyThrows
     public VertxMqProducer(Class<T> cls) {
         producerVerticle = new MqProducerVerticle<>(cls);
-        VertxManager.getVertx().deployVerticle(producerVerticle, new Handler<AsyncResult<String>>() {
-            @Override
-            public void handle(AsyncResult<String> stringAsyncResult) {
-                countDownLatch.countDown();
-            }
-        });
+        VertxManager.getVertx().deployVerticle(producerVerticle, stringAsyncResult -> countDownLatch.countDown());
         //等待初始化完成
         countDownLatch.await();
     }

+ 6 - 0
iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/DeviceController.java

@@ -90,6 +90,12 @@ public class DeviceController {
         return deviceServiceImpl.addDevice(bo.getData());
     }
 
+    @ApiOperation(value = "保存设备")
+    @PostMapping("/save")
+    public boolean saveDevice(@RequestBody @Validated Request<DeviceInfoBo> bo) {
+        return deviceServiceImpl.saveDevice(bo.getData());
+    }
+
     @ApiOperation(value = "获取子设备", notes = "获取子设备")
     @PostMapping("/children/list")
     public List<DeviceInfoVo> getChildren(@Validated @RequestBody PageRequest<String> request) {

+ 3 - 1
iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/device/DeviceInfoBo.java

@@ -20,6 +20,8 @@ public class DeviceInfoBo extends BaseDto {
 
     private static final long serialVersionUID = -1L;
 
+    private String id;
+
     @ApiModelProperty(value = "创建时间")
     private Long createAt;
 
@@ -63,7 +65,7 @@ public class DeviceInfoBo extends BaseDto {
     @Size(max = 255, message = "设备状态长度不正确")
     @AutoMapping(ignore = true)
     @ReverseAutoMapping(ignore = true)
-    private String state;
+    private DeviceInfo.State state;
 
     @ApiModelProperty(value = "用户id")
     @Size(max = 255, message = "用户id长度不正确")

+ 2 - 0
iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/IDeviceService.java

@@ -73,4 +73,6 @@ public interface IDeviceService {
     boolean saveConfig(DeviceConfig data);
 
     DeviceConfigVo getConfig(String deviceId);
+
+    boolean saveDevice(DeviceInfoBo data);
 }

+ 8 - 0
iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/impl/DeviceServiceImpl.java

@@ -406,5 +406,13 @@ public class DeviceServiceImpl implements IDeviceService {
 
     }
 
+    @Override
+    public boolean saveDevice(DeviceInfoBo data) {
+        DeviceInfo di=data.to(DeviceInfo.class);
+        di.setLocate(new DeviceInfo.Locate(data.getLongitude(),data.getLatitude()));
+        di.setState(data.getState());
+        return deviceInfoData.save(di)!=null;
+    }
+
 
 }

+ 1 - 2
项目规范.md

@@ -1,8 +1,7 @@
 # **项目规范**
 
 ## **接口**
-请求类型统一未POST,路径大致为模块归类/动作+资源,请求参数所有均封装下Request,超过一个参数必须
-封装成Bo对象
+请求类型统一为POST,路径大致为模块归类/动作+资源,请求参数所有均封装下Request,超过一个参数必须封装成Bo对象
 
 ## **数据库**