Commit 1514a33d by 李小龙

整理代码

parent ee79a584
...@@ -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::getId, iotDeviceIdSet); .in(PlatDevice::getOriDeviceId, 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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment