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
1514a33d
authored
Sep 08, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
整理代码
parent
ee79a584
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
server-service/src/main/java/com/makeit/task/IotSyncTask.java
server-service/src/main/java/com/makeit/task/IotSyncTask.java
View file @
1514a33d
...
@@ -2,7 +2,6 @@ package com.makeit.task;
...
@@ -2,7 +2,6 @@ package com.makeit.task;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.makeit.common.entity.BaseBusEntity
;
import
com.makeit.common.entity.BaseBusEntity
;
import
com.makeit.common.entity.BaseEntity
;
import
com.makeit.entity.platform.device.PlatDevice
;
import
com.makeit.entity.platform.device.PlatDevice
;
import
com.makeit.entity.saas.PlatTenant
;
import
com.makeit.entity.saas.PlatTenant
;
import
com.makeit.enums.CommonEnum
;
import
com.makeit.enums.CommonEnum
;
...
@@ -61,7 +60,7 @@ public class IotSyncTask {
...
@@ -61,7 +60,7 @@ public class IotSyncTask {
//查询平台设备
//查询平台设备
Set
<
String
>
iotDeviceIdSet
=
iotDeviceList
.
stream
().
map
(
DeviceInstanceEntity:
:
getId
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
iotDeviceIdSet
=
iotDeviceList
.
stream
().
map
(
DeviceInstanceEntity:
:
getId
).
collect
(
Collectors
.
toSet
());
LambdaQueryWrapper
<
PlatDevice
>
deviceLambdaQueryWrapper
=
new
LambdaQueryWrapper
<
PlatDevice
>().
eq
(
BaseBusEntity:
:
getTenantId
,
platTenant
.
getId
())
LambdaQueryWrapper
<
PlatDevice
>
deviceLambdaQueryWrapper
=
new
LambdaQueryWrapper
<
PlatDevice
>().
eq
(
BaseBusEntity:
:
getTenantId
,
platTenant
.
getId
())
.
in
(
BaseEntity:
:
get
Id
,
iotDeviceIdSet
);
.
in
(
PlatDevice:
:
getOriDevice
Id
,
iotDeviceIdSet
);
List
<
PlatDevice
>
deviceList
=
platDeviceService
.
list
(
deviceLambdaQueryWrapper
);
List
<
PlatDevice
>
deviceList
=
platDeviceService
.
list
(
deviceLambdaQueryWrapper
);
//更新平台设备
//更新平台设备
Collection
<
PlatDevice
>
platDevices
=
convertToPlatDevice
(
iotDeviceList
,
deviceList
,
platTenant
.
getId
());
Collection
<
PlatDevice
>
platDevices
=
convertToPlatDevice
(
iotDeviceList
,
deviceList
,
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