Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
b2399e8a
Commit
b2399e8a
authored
Jun 27, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改第三方发送
parent
8bcfbc5e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+4
-0
doc/api.md
doc/api.md
+4
-0
doc/设备管理系统.docx
doc/设备管理系统.docx
+0
-0
No files found.
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
b2399e8a
package
com.mortals.xhx.module.device.service.impl
;
import
cn.hutool.core.lang.PatternPool
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICacheService
;
...
...
@@ -206,9 +207,12 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
&&
entity
.
getSwitchSend
())
{
if
(
PatternPool
.
URL_HTTP
.
matcher
(
platformEntity
.
getSendUrl
()).
find
())
{
ApiResp
<
String
>
resp
=
messageService
.
sendThirdParty
(
platformEntity
.
getSendUrl
(),
deviceReq
);
log
.
info
(
"sendThirtyis resp ==>{}"
,
JSON
.
toJSONString
(
resp
));
}
else
{
throw
new
AppException
(
"http send url 不合法!"
+
platformEntity
.
getSendUrl
());
}
}
else
{
log
.
info
(
"sendThirtyis null ==>{}"
,
JSON
.
toJSONString
(
platformEntity
));
}
}
...
...
doc/api.md
View file @
b2399e8a
...
...
@@ -326,6 +326,7 @@ headers|Object|消息头|是|-
 
data|Object|消息头数据对象|是|-
  
protocol|String|数据域协议类型,默认json|是|-
  
messageType|String|上报消息类型|是|HEART_BEAT
  
deviceCode|String|设备编码信息|是|如:mac地址
  
sign|String|签名|是|-
  
timestamp|String|时间戳|是|-
data|byte[]|byte数组,base64编码|是|-
...
...
@@ -339,6 +340,7 @@ key|String|消息唯一标识|是|-
"data":{
"protocol":"json",
"messageType":"HEART_BEAT",
"deviceCode":"A1:A2:A3:A4:A5:A6",
"sign":"abcd1234",
"timestamp":"2022-04-15 09:48:05"
}
...
...
@@ -365,6 +367,7 @@ headers|Object|消息头|是|-
 
data|Object|消息头数据对象|是|-
  
protocol|String|数据域协议类型,默认json|是|-
  
messageType|String|下发消息类型|是|DOWN_UPGREAD
  
deviceCode|String|设备编码信息|是|如:mac地址
  
sign|String|签名|是|-
  
timestamp|String|时间戳|是|-
data|byte[]|byte数组,base64编码|是|-
...
...
@@ -378,6 +381,7 @@ key|String|消息唯一标识|是|-
"data":{
"protocol":"json",
"messageType":"UPGREAD",
"deviceCode":"A1:A2:A3:A4:A5:A6",
"sign":"abcd1234",
"timestamp":"2022-04-15 09:48:05"
}
...
...
doc/设备管理系统.docx
View file @
b2399e8a
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment