From a48af6b9d998793a0b5464e162e12ceb45bcf232 Mon Sep 17 00:00:00 2001 From: HuangXin Date: Thu, 24 Sep 2020 15:52:51 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E5=AF=B9=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=97=B6=E5=A2=9E=E5=8A=A0=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=8D=E8=83=BD=E4=BF=AE=E6=94=B9=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/impl/DisposeDeviceManagerImpl.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java b/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java index 3c541dd2..635240a6 100644 --- a/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java +++ b/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java @@ -108,8 +108,8 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager { Field fdDest = destDev.getClass().getDeclaredField(fdSrc.getName()); fdDest.setAccessible(true); if (!obj.equals(fdDest.get(destDev))) { - log.debug("Upgrade field [{}] value form [{}] to [{}]", - fdSrc.getName(), fdDest.get(destDev), obj); + log.debug("Upgrade field [{}] value form [{}] to [{}]", fdSrc.getName(), fdDest.get(destDev), + obj); fdDest.set(destDev, obj); } fdDest.setAccessible(false); @@ -150,6 +150,12 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager { if (tDev == null) { return new MulReturnType<>(ErrorCode.ERR_NOSUCHDEVICE, -1L); } + + // 过滤不允许修改的值 + dev.setUrlPath(null); + dev.setUserName(null); + dev.setUrlType(null); + dev.setPassword(null); // 更新值 upgradeDisposeDeviceProperties(tDev, dev); @@ -237,7 +243,7 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager { // 获取分页信息 PageInfo pageInfo = new PageInfo<>(devList); - if(devList.size() > 0) { + if (devList.size() > 0) { // 返回实际数据 List idArray = devList.stream().map(DisposeDevice::getId).collect(Collectors.toList()); rspList.addAll(disposeDeviceMapper.selectByIdSet(idArray));