Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iot-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SuperHive
back-end
iot-service
Commits
b00e2260
Commit
b00e2260
authored
Aug 14, 2020
by
huangcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取设备接入信息功能接口优化
parent
25d31d5f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
DeviceInstanceServiceImpl.java
...e/devicemodel/service/impl/DeviceInstanceServiceImpl.java
+8
-1
No files found.
src/main/java/com/esv/datacenter/iot/module/devicemodel/service/impl/DeviceInstanceServiceImpl.java
View file @
b00e2260
...
...
@@ -70,10 +70,13 @@ public class DeviceInstanceServiceImpl extends ServiceImpl<DeviceInstanceDao, De
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteInstance
(
Long
id
)
{
// 获取实例信息
DeviceInstanceEntity
deviceInstanceEntity
=
this
.
getInstanceById
(
id
);
// 删除实例
this
.
getBaseMapper
().
deleteById
(
id
);
// 删除设备Mqtt Topic权限记录
DeviceInstanceEntity
deviceInstanceEntity
=
this
.
getInstanceById
(
id
);
mqttClientAuthComponent
.
deleteClientAcl
(
deviceInstanceEntity
.
getCommunicationId
());
}
...
...
@@ -259,9 +262,13 @@ public class DeviceInstanceServiceImpl extends ServiceImpl<DeviceInstanceDao, De
List
<
DeviceInstanceMqttTopicInfoVO
>
mqttTopicInfoVOList
=
new
ArrayList
<>();
for
(
DeviceInstanceFullMapDto
dto
:
deviceInstanceFullMapDtoList
)
{
DeviceInstanceMqttTopicInfoVO
topicInfoVO
=
new
DeviceInstanceMqttTopicInfoVO
();
if
(
Objects
.
isNull
(
dto
.
getDataModelId
()))
{
continue
;
}
topicInfoVO
.
setDataModelId
(
dto
.
getDataModelId
());
topicInfoVO
.
setDataModelName
(
dto
.
getDataModelName
());
topicInfoVO
.
setMqttTopic
(
mqttTopicMap
.
get
(
dto
.
getDataModelId
()));
mqttTopicInfoVOList
.
add
(
topicInfoVO
);
}
vo
.
setMqttTopicInfoVOList
(
mqttTopicInfoVOList
);
...
...
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