Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e841eac1
authored
Mar 01, 2024
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Revert: 设备解绑后同步问题
parent
a2343a39
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
e841eac1
...
@@ -956,6 +956,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -956,6 +956,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
}
}
//查询iot设备
//查询iot设备
List
<
DeviceInstanceEntity
>
iotDeviceList
=
iotOrgService
.
getOrgDevice
(
iotOrgId
);
List
<
DeviceInstanceEntity
>
iotDeviceList
=
iotOrgService
.
getOrgDevice
(
iotOrgId
);
if
(
CollectionUtils
.
isEmpty
(
iotDeviceList
))
{
continue
;
}
//查询平台设备
//查询平台设备
Set
<
String
>
iotDeviceIdSet
=
iotDeviceList
.
stream
().
map
(
DeviceInstanceEntity:
:
getId
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
iotDeviceIdSet
=
iotDeviceList
.
stream
().
map
(
DeviceInstanceEntity:
:
getId
).
collect
(
Collectors
.
toSet
());
...
@@ -965,9 +968,10 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -965,9 +968,10 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
Set
<
String
>
newIotDeviceIdSet
=
Sets
.
newHashSet
(
iotDeviceIdSet
);
Set
<
String
>
newIotDeviceIdSet
=
Sets
.
newHashSet
(
iotDeviceIdSet
);
Set
<
String
>
newPlatformDeviceIdSet
=
Sets
.
newHashSet
(
platformDeviceIdList
);
Set
<
String
>
newPlatformDeviceIdSet
=
Sets
.
newHashSet
(
platformDeviceIdList
);
if
(
CollectionUtils
.
is
Not
Empty
(
newIotDeviceIdSet
))
{
if
(
CollectionUtils
.
isEmpty
(
newIotDeviceIdSet
))
{
newPlatformDeviceIdSet
.
removeAll
(
newIotDeviceIdSet
)
;
continue
;
}
}
newPlatformDeviceIdSet
.
removeAll
(
newIotDeviceIdSet
);
if
(
CollectionUtils
.
isNotEmpty
(
newPlatformDeviceIdSet
))
{
if
(
CollectionUtils
.
isNotEmpty
(
newPlatformDeviceIdSet
))
{
log
.
info
(
"删除不存在iot的设备:{}"
,
platTenant
.
getId
());
log
.
info
(
"删除不存在iot的设备:{}"
,
platTenant
.
getId
());
...
...
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