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
fc40e759
Commit
fc40e759
authored
Feb 01, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加服务检测拉起脚本
parent
f4c54c74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceSendMsgController.java
...va/com/mortals/xhx/busiz/web/DeviceSendMsgController.java
+3
-2
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceSendMsgController.java
View file @
fc40e759
package
com.mortals.xhx.busiz.web
;
package
com.mortals.xhx.busiz.web
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.IdUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.xhx.base.system.message.impl.MessageProducer
;
import
com.mortals.xhx.base.system.message.impl.MessageProducer
;
import
com.mortals.xhx.busiz.req.UploadDeviceReq
;
import
com.mortals.xhx.busiz.req.UploadDeviceReq
;
...
@@ -42,6 +42,7 @@ public class DeviceSendMsgController {
...
@@ -42,6 +42,7 @@ public class DeviceSendMsgController {
@PostMapping
(
"refreshMessage"
)
@PostMapping
(
"refreshMessage"
)
@UnAuth
public
String
refreshMessage
(
@RequestBody
UploadDeviceReq
req
)
{
public
String
refreshMessage
(
@RequestBody
UploadDeviceReq
req
)
{
log
.
info
(
"【设备通知刷新数据】【请求体】--> "
+
JSONObject
.
toJSONString
(
req
));
log
.
info
(
"【设备通知刷新数据】【请求体】--> "
+
JSONObject
.
toJSONString
(
req
));
ApiResp
<
String
>
rsp
=
new
ApiResp
<>();
ApiResp
<
String
>
rsp
=
new
ApiResp
<>();
...
@@ -56,7 +57,7 @@ public class DeviceSendMsgController {
...
@@ -56,7 +57,7 @@ public class DeviceSendMsgController {
header
.
put
(
MessageHeader
.
DEVICECODE
,
deviceEntity
.
getDeviceCode
());
header
.
put
(
MessageHeader
.
DEVICECODE
,
deviceEntity
.
getDeviceCode
());
header
.
put
(
MessageHeader
.
TIMESTAMP
,
DateUtils
.
getCurrStrDateTime
());
header
.
put
(
MessageHeader
.
TIMESTAMP
,
DateUtils
.
getCurrStrDateTime
());
TbQueueMsg
queueMsg
=
new
DefaultTbQueueMsg
(
IdUtil
.
fastUUID
(),
Base64
.
encode
(
new
JSONObject
().
toJSONString
())
,
header
);
TbQueueMsg
queueMsg
=
new
DefaultTbQueueMsg
(
IdUtil
.
fastUUID
(),
"W10="
,
header
);
messageProducer
.
sendMsg
(
QueueKey
.
DEFAULT_EXCHANGE
,
Constant
.
DOWN_TOPIC
+
deviceEntity
.
getDeviceCode
(),
JSON
.
toJSONString
(
queueMsg
));
messageProducer
.
sendMsg
(
QueueKey
.
DEFAULT_EXCHANGE
,
Constant
.
DOWN_TOPIC
+
deviceEntity
.
getDeviceCode
(),
JSON
.
toJSONString
(
queueMsg
));
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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