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
5b103540
Commit
5b103540
authored
Dec 16, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分组更新设备
parent
398f674b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
device-manager/src/main/java/com/mortals/xhx/daemon/DemoApiController.java
...c/main/java/com/mortals/xhx/daemon/DemoApiController.java
+3
-3
No files found.
device-manager/src/main/java/com/mortals/xhx/daemon/DemoApiController.java
View file @
5b103540
...
...
@@ -17,9 +17,7 @@ import com.mortals.xhx.common.model.DefaultTbQueueMsgHeaders;
import
com.mortals.xhx.common.model.MessageHeader
;
import
com.mortals.xhx.module.device.model.DeviceEntity
;
import
com.mortals.xhx.module.device.service.DeviceService
;
import
com.mortals.xhx.module.platform.model.PlatformEntity
;
import
com.mortals.xhx.module.platform.service.PlatformService
;
import
com.mortals.xhx.module.product.model.ProductEntity
;
import
com.mortals.xhx.module.product.service.ProductService
;
import
com.mortals.xhx.queue.*
;
import
com.mortals.xhx.queue.provider.TbCoreQueueProducerProvider
;
...
...
@@ -155,6 +153,7 @@ public class DemoApiController {
if
(!
ObjectUtils
.
isEmpty
(
deviceEntity
))
{
//将上报信息转发到mq中
/*
PlatformEntity platformEntity = platformService.getCache(deviceEntity.getPlatformId().toString());
if (ObjectUtils.isEmpty(platformEntity)) {
throw new AppException("当前设备未配置所属系统平台,请在后台配置后再激活!");
...
...
@@ -165,6 +164,7 @@ public class DemoApiController {
throw new AppException("当前设备未配置所属产品,请在后台配置后再激活!");
}
String exchangeName = platformEntity.getPlatformSn() + Constant.EXCHANGE_SPLIT + productEntity.getProductCode();
*/
/* TopicPartitionInfo info = TopicPartitionInfo.builder().exchangeName(exchangeName).topic(Constant.UPLOAD_TOPIC + deviceEntity.getDeviceMac()).build();
TbQueueMsgHeaders header = new DefaultTbQueueMsgHeaders();
...
...
@@ -182,7 +182,7 @@ public class DemoApiController {
// header.put(MessageHeader.TIMESTAMP, );
TbQueueMsg
queueMsg
=
new
DefaultTbQueueMsg
(
IdUtil
.
fastUUID
(),
"w=="
,
header
);
messageProducer
.
sendMsg
(
QueueKey
.
DEFAULT_EXCHANGE
,
Constant
.
DOWN
_TOPIC
+
deviceEntity
.
getDeviceCode
(),
JSON
.
toJSONString
(
queueMsg
));
messageProducer
.
sendMsg
(
QueueKey
.
DEFAULT_EXCHANGE
,
Constant
.
UPLOAD
_TOPIC
+
deviceEntity
.
getDeviceCode
(),
JSON
.
toJSONString
(
queueMsg
));
}
...
...
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