From e25785d366949cb9dc22d6fff0b5319a4273c938 Mon Sep 17 00:00:00 2001 From: chenlinghy Date: Wed, 9 Sep 2020 16:30:52 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=E8=A7=A3=E5=86=B3manger?= =?UTF-8?q?=E5=B1=82=E8=AE=BE=E5=A4=87=E6=96=B0=E5=A2=9E=E5=92=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=AE=BE=E5=A4=87=E8=83=BD=E5=8A=9B=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9C=AA=E6=88=90=E5=8A=9F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dispose/manager/impl/DisposeDeviceManagerImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java b/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java index be427d36..b86b40b8 100644 --- a/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java +++ b/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java @@ -77,6 +77,7 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager { // 添加设备能力信息 if (err == ErrorCode.ERR_OK) { + dev.getDevCapacity().forEach(v-> v.setDeviceId(dev.getId())); disposeCapacityMapper.addNewDisposeCapacity(dev.getDevCapacity()); } @@ -160,7 +161,10 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager { disposeCapacityMapper.delDeviceDisposeCapacity(tDev.getId()); // 新增能力信息完成更新 + Long devId = tDev.getId(); + if (tDev.getDevCapacity().size() != 0) { + tDev.getDevCapacity().forEach(v-> v.setDeviceId(devId)); disposeCapacityMapper.addNewDisposeCapacity(tDev.getDevCapacity()); }