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
483165ff
Commit
483165ff
authored
May 07, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加告警统计信息
parent
28db3b8a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
3 deletions
+5
-3
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+2
-1
device-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
...er/src/main/java/com/mortals/xhx/common/key/RedisKey.java
+1
-1
device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java
.../java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java
+1
-0
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
.../java/com/mortals/httpclient/device/DeviceController.http
+1
-1
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
483165ff
...
...
@@ -233,7 +233,8 @@ public class DeviceApiController {
deviceEntity
.
setDeviceStatus
(
DeviceStatusEnum
.
在线
.
getValue
());
deviceEntity
.
setDeviceVersion
(
req
.
getDeviceVersion
()
==
null
?
""
:
req
.
getDeviceVersion
());
//todo 延迟队列更新 此时进入redis 队列
cacheService
.
rpush
(
RedisKey
.
KEY_DEVICE_ONLINE_QUEUE
,
deviceEntity
);
Long
lpush
=
cacheService
.
lpush
(
RedisKey
.
KEY_DEVICE_ONLINE_QUEUE
,
deviceEntity
);
log
.
info
(
"lpush:{}"
,
lpush
);
//deviceService.getDeviceDao().update(deviceEntity);
rsp
.
setData
(
deviceResp
);
...
...
device-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
View file @
483165ff
...
...
@@ -18,7 +18,7 @@ public class RedisKey {
/**
* 设备上线更新队列
*/
public
static
final
String
KEY_DEVICE_ONLINE_QUEUE
=
"device:
online:
queue"
;
public
static
final
String
KEY_DEVICE_ONLINE_QUEUE
=
"device:queue"
;
public
static
final
String
KEY_SITE_CACHE
=
"siteDict"
;
...
...
device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java
View file @
483165ff
...
...
@@ -46,6 +46,7 @@ public class DeviceStatTaskImpl implements ITaskExcuteService {
while
(
true
)
{
DeviceEntity
deviceEntity
=
cacheService
.
lpop
(
RedisKey
.
KEY_DEVICE_ONLINE_QUEUE
,
DeviceEntity
.
class
);
if
(
ObjectUtils
.
isEmpty
(
deviceEntity
))
{
log
.
info
(
"等待更新队列为空"
);
break
;
}
else
{
waitDeviceInfos
.
add
(
deviceEntity
);
...
...
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
View file @
483165ff
...
...
@@ -98,7 +98,7 @@ POST {{baseUrl}}/api/register
Content-Type: application/json
{
"deviceCode": "
0c-cf-89-09-d1-c8
"
"deviceCode": "
B8-13-32-86-3E-F4
"
}
> {%
...
...
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