From f8c9828369ea29edf299567c78c13da3afd4e9b3 Mon Sep 17 00:00:00 2001 From: chendaofei <857448963@qq.com> Date: Tue, 23 Dec 2025 17:11:55 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CsCommTerminalServiceImpl.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsCommTerminalServiceImpl.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsCommTerminalServiceImpl.java index 09660c2..74a4a9e 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsCommTerminalServiceImpl.java +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsCommTerminalServiceImpl.java @@ -1,9 +1,9 @@ package com.njcn.csdevice.service.impl; import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.njcn.common.pojo.enums.common.DataStateEnum; -import com.njcn.common.pojo.enums.response.CommonResponseEnum; -import com.njcn.common.utils.HttpResultUtil; +import com.njcn.csdevice.mapper.CsLinePOMapper; import com.njcn.csdevice.mapper.PqsDeviceUnitMapper; import com.njcn.csdevice.pojo.po.CsDeviceUserPO; import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO; @@ -11,7 +11,6 @@ import com.njcn.csdevice.pojo.po.CsLinePO; import com.njcn.csdevice.service.CsCommTerminalService; import com.njcn.csdevice.service.CsDeviceUserPOService; import com.njcn.csdevice.service.CsEquipmentDeliveryService; -import com.njcn.csdevice.service.CsLinePOService; import com.njcn.device.biz.pojo.po.PqsDeviceUnit; import com.njcn.user.api.UserFeignClient; import com.njcn.user.pojo.constant.UserType; @@ -36,7 +35,7 @@ public class CsCommTerminalServiceImpl implements CsCommTerminalService { private final PqsDeviceUnitMapper pqsDeviceUnitMapper; private final CsDeviceUserPOService csDeviceUserPOService; - private final CsLinePOService csLinePOService; + private final CsLinePOMapper csLinePOMapper; private final UserFeignClient userFeignClient; private final CsEquipmentDeliveryService csEquipmentDeliveryService; @@ -48,8 +47,11 @@ public class CsCommTerminalServiceImpl implements CsCommTerminalService { if (CollUtil.isEmpty(devIds)) { return result; } - List poList = csLinePOService.lambdaQuery().select(CsLinePO::getLineId).in(CsLinePO::getDeviceId, devIds) - .eq(CsLinePO::getStatus, DataStateEnum.ENABLE.getCode()).list(); + + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.select(CsLinePO::getLineId).in(CsLinePO::getDeviceId, devIds) + .eq(CsLinePO::getStatus, DataStateEnum.ENABLE.getCode()); + List poList = csLinePOMapper.selectList(lambdaQueryWrapper); if (CollUtil.isNotEmpty(poList)) { result = poList.stream().map(CsLinePO::getLineId).distinct().collect(Collectors.toList()); } @@ -63,8 +65,10 @@ public class CsCommTerminalServiceImpl implements CsCommTerminalService { if (CollUtil.isEmpty(devIds)) { return result; } - List poList = csLinePOService.lambdaQuery().select(CsLinePO::getLineId, CsLinePO::getMonitorUser).in(CsLinePO::getDeviceId, devIds) - .eq(CsLinePO::getStatus, DataStateEnum.ENABLE.getCode()).list(); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.select(CsLinePO::getLineId, CsLinePO::getMonitorUser).in(CsLinePO::getDeviceId, devIds) + .eq(CsLinePO::getStatus, DataStateEnum.ENABLE.getCode()); + List poList =csLinePOMapper.selectList(lambdaQueryWrapper); if (CollUtil.isNotEmpty(poList)) { result = poList.stream().map(CsLinePO::getMonitorUser).distinct().collect(Collectors.toList()); }