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
f4a43c8a
Commit
f4a43c8a
authored
Dec 13, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决设备下发消息
parent
166741d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+4
-5
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
f4a43c8a
...
@@ -77,7 +77,6 @@ import java.util.stream.Collectors;
...
@@ -77,7 +77,6 @@ import java.util.stream.Collectors;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
Constant
.*;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
Constant
.*;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.*;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.*;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_DEVICE_DOWN_MSG_QUEUE
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_TOKEN_API_CACHE
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_TOKEN_API_CACHE
;
/**
/**
...
@@ -669,11 +668,11 @@ public class DeviceApiController {
...
@@ -669,11 +668,11 @@ public class DeviceApiController {
rsp
.
setCode
(
ApiRespCodeEnum
.
SUCCESS
.
getValue
());
rsp
.
setCode
(
ApiRespCodeEnum
.
SUCCESS
.
getValue
());
try
{
try
{
List
<
DeviceMsgReq
>
collect
=
list
.
stream
().
sorted
(
Comparator
.
comparing
(
DeviceMsgReq:
:
getTimestamp
)).
collect
(
Collectors
.
toList
());
List
<
DeviceMsgReq
>
collect
=
list
.
stream
().
sorted
(
Comparator
.
comparing
(
DeviceMsgReq:
:
getTimestamp
)).
collect
(
Collectors
.
toList
());
collect
.
forEach
(
item
->{
/*
collect.forEach(item->{
cacheService.lpush(KEY_DEVICE_DOWN_MSG_QUEUE,item);
cacheService.lpush(KEY_DEVICE_DOWN_MSG_QUEUE,item);
});
});
*/
//
DownMsgTask downMsgTask = new DownMsgTask(list, platformService, productService, deviceService, deviceLogService, messageProducer);
DownMsgTask
downMsgTask
=
new
DownMsgTask
(
list
,
platformService
,
productService
,
deviceService
,
deviceLogService
,
messageProducer
);
//
sendTaskThreadPool.execute(downMsgTask);
sendTaskThreadPool
.
execute
(
downMsgTask
);
}
catch
(
AppException
e
)
{
}
catch
(
AppException
e
)
{
log
.
error
(
"接收数据失败"
,
e
);
log
.
error
(
"接收数据失败"
,
e
);
rsp
.
setCode
(
e
.
getCode
());
rsp
.
setCode
(
e
.
getCode
());
...
...
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