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
be9eca1d
Commit
be9eca1d
authored
Jul 14, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备列表导出优化
parent
2adadaf6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+5
-7
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 @
be9eca1d
...
@@ -156,6 +156,7 @@ public class DeviceApiController {
...
@@ -156,6 +156,7 @@ public class DeviceApiController {
deviceInfo
.
setProductId
(
productEntity
.
getId
());
deviceInfo
.
setProductId
(
productEntity
.
getId
());
deviceInfo
.
setProductName
(
productEntity
.
getProductName
());
deviceInfo
.
setProductName
(
productEntity
.
getProductName
());
deviceInfo
.
setEnabled
(
deviceEntity
.
getEnabled
());
deviceInfo
.
setEnabled
(
deviceEntity
.
getEnabled
());
deviceInfo
.
setSource
(
deviceEntity
.
getSource
());
registerResp
.
setDeviceInfo
(
deviceInfo
);
registerResp
.
setDeviceInfo
(
deviceInfo
);
String
content
=
EncryptUtil
.
myEnscrt
(
JSON
.
toJSONString
(
registerResp
),
9
,
DES_STR
,
ENCRYPT_STR
);
String
content
=
EncryptUtil
.
myEnscrt
(
JSON
.
toJSONString
(
registerResp
),
9
,
DES_STR
,
ENCRYPT_STR
);
...
@@ -326,8 +327,10 @@ public class DeviceApiController {
...
@@ -326,8 +327,10 @@ public class DeviceApiController {
deviceService
.
update
(
deviceEntity
,
null
);
deviceService
.
update
(
deviceEntity
,
null
);
}
}
//deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ACTIVE);
if
(
deviceEntity
.
getDeviceStatus
()
==
DeviceStatusEnum
.
未激活
.
getValue
())
{
//deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ONLINE);
throw
new
AppException
(
DEVICE_UNACTIVE
,
DEVICE_UNACTIVE_CONTENT
);
}
DeviceQueueAuthInfo
authInfo
=
new
DeviceQueueAuthInfo
();
DeviceQueueAuthInfo
authInfo
=
new
DeviceQueueAuthInfo
();
authInfo
.
setHost
(
host
);
authInfo
.
setHost
(
host
);
authInfo
.
setPort
(
port
);
authInfo
.
setPort
(
port
);
...
@@ -356,14 +359,9 @@ public class DeviceApiController {
...
@@ -356,14 +359,9 @@ public class DeviceApiController {
deviceInfo
.
setProductName
(
productEntity
.
getProductName
());
deviceInfo
.
setProductName
(
productEntity
.
getProductName
());
deviceInfo
.
setEnabled
(
deviceEntity
.
getEnabled
());
deviceInfo
.
setEnabled
(
deviceEntity
.
getEnabled
());
deviceInfo
.
setSource
(
deviceEntity
.
getSource
());
deviceInfo
.
setSource
(
deviceEntity
.
getSource
());
registerResp
.
setDeviceInfo
(
deviceInfo
);
registerResp
.
setDeviceInfo
(
deviceInfo
);
String
content
=
EncryptUtil
.
myEnscrt
(
JSON
.
toJSONString
(
registerResp
),
9
,
DES_STR
,
ENCRYPT_STR
);
String
content
=
EncryptUtil
.
myEnscrt
(
JSON
.
toJSONString
(
registerResp
),
9
,
DES_STR
,
ENCRYPT_STR
);
log
.
info
(
"deEncrypt:{}"
,
EncryptUtil
.
myReEnscrt
(
content
,
9
,
DES_STR
,
ENCRYPT_STR
));
deviceResp
.
setContent
(
content
);
deviceResp
.
setContent
(
content
);
rsp
.
setData
(
deviceResp
);
rsp
.
setData
(
deviceResp
);
}
catch
(
AppException
e
)
{
}
catch
(
AppException
e
)
{
log
.
error
(
"接收数据失败"
,
e
);
log
.
error
(
"接收数据失败"
,
e
);
...
...
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceMsgComsumerStartedService.java
View file @
be9eca1d
...
@@ -89,7 +89,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi
...
@@ -89,7 +89,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi
this
.
consumersExecutor
=
Executors
.
newCachedThreadPool
(
IotThreadFactory
.
forName
(
"消费queue线程"
));
this
.
consumersExecutor
=
Executors
.
newCachedThreadPool
(
IotThreadFactory
.
forName
(
"消费queue线程"
));
consumersExecutor
.
submit
(()
->
{
consumersExecutor
.
submit
(()
->
{
int
waitTime
=
10
00
;
int
waitTime
=
10
;
while
(!
stopped
)
{
while
(!
stopped
)
{
try
{
try
{
List
<
TbQueueMsg
>
messageList
=
new
ArrayList
(
32
);
List
<
TbQueueMsg
>
messageList
=
new
ArrayList
(
32
);
...
...
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