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
d02d954a
Commit
d02d954a
authored
Jun 23, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改redis 过期事件通知
parent
9bf0a7d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+1
-2
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceMsgComsumerStartedService.java
...n/applicationservice/DeviceMsgComsumerStartedService.java
+1
-1
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
d02d954a
...
@@ -248,7 +248,6 @@ public class DeviceApiController {
...
@@ -248,7 +248,6 @@ public class DeviceApiController {
* @return
* @return
*/
*/
@PostMapping
(
"upload"
)
@PostMapping
(
"upload"
)
//@DeviceAuth
public
String
upload
(
@RequestBody
UploadDeviceReq
req
)
{
public
String
upload
(
@RequestBody
UploadDeviceReq
req
)
{
log
.
info
(
"【设备数据上报】【请求体】--> "
+
JSONObject
.
toJSONString
(
req
));
log
.
info
(
"【设备数据上报】【请求体】--> "
+
JSONObject
.
toJSONString
(
req
));
ApiResp
<
String
>
rsp
=
new
ApiResp
<>();
ApiResp
<
String
>
rsp
=
new
ApiResp
<>();
...
@@ -271,7 +270,7 @@ public class DeviceApiController {
...
@@ -271,7 +270,7 @@ public class DeviceApiController {
}
}
String
exchangeName
=
platformEntity
.
getPlatformSn
()
+
Constant
.
EXCHANGE_SPLIT
+
productEntity
.
getProductCode
();
String
exchangeName
=
platformEntity
.
getPlatformSn
()
+
Constant
.
EXCHANGE_SPLIT
+
productEntity
.
getProductCode
();
TopicPartitionInfo
info
=
TopicPartitionInfo
.
builder
().
exchangeName
(
exchangeName
).
topic
(
Constant
.
UPLOAD_TOPIC
+
deviceEntity
.
getDevice
Mac
()).
build
();
TopicPartitionInfo
info
=
TopicPartitionInfo
.
builder
().
exchangeName
(
exchangeName
).
topic
(
Constant
.
UPLOAD_TOPIC
+
deviceEntity
.
getDevice
Code
()).
build
();
TbQueueMsgHeaders
header
=
new
DefaultTbQueueMsgHeaders
();
TbQueueMsgHeaders
header
=
new
DefaultTbQueueMsgHeaders
();
header
.
put
(
MessageHeader
.
MESSAGETYPE
,
Constant
.
MESSAGETYPE_HEARTBEAT
);
header
.
put
(
MessageHeader
.
MESSAGETYPE
,
Constant
.
MESSAGETYPE_HEARTBEAT
);
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
...
...
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceMsgComsumerStartedService.java
View file @
d02d954a
...
@@ -163,7 +163,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi
...
@@ -163,7 +163,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi
if
(
Objects
.
nonNull
(
messages
))
{
if
(
Objects
.
nonNull
(
messages
))
{
try
{
try
{
for
(
TbQueueMsg
queueMsg
:
messages
)
{
for
(
TbQueueMsg
queueMsg
:
messages
)
{
log
.
debug
(
"[WRITE MESSAGE] ->message:{}"
,
JSON
.
toJSONString
(
queueMsg
));
log
.
info
(
"[WRITE MESSAGE] ->message:{}"
,
JSON
.
toJSONString
(
queueMsg
));
//做相应业务,做日志操作
//做相应业务,做日志操作
DeviceReq
deviceReq
=
JSON
.
parseObject
(
new
String
(
queueMsg
.
getData
()),
DeviceReq
.
class
);
DeviceReq
deviceReq
=
JSON
.
parseObject
(
new
String
(
queueMsg
.
getData
()),
DeviceReq
.
class
);
boolean
bool
=
false
;
boolean
bool
=
false
;
...
...
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