parent
bd8e763594
commit
a48af6b9d9
|
@ -108,8 +108,8 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager {
|
||||||
Field fdDest = destDev.getClass().getDeclaredField(fdSrc.getName());
|
Field fdDest = destDev.getClass().getDeclaredField(fdSrc.getName());
|
||||||
fdDest.setAccessible(true);
|
fdDest.setAccessible(true);
|
||||||
if (!obj.equals(fdDest.get(destDev))) {
|
if (!obj.equals(fdDest.get(destDev))) {
|
||||||
log.debug("Upgrade field [{}] value form [{}] to [{}]",
|
log.debug("Upgrade field [{}] value form [{}] to [{}]", fdSrc.getName(), fdDest.get(destDev),
|
||||||
fdSrc.getName(), fdDest.get(destDev), obj);
|
obj);
|
||||||
fdDest.set(destDev, obj);
|
fdDest.set(destDev, obj);
|
||||||
}
|
}
|
||||||
fdDest.setAccessible(false);
|
fdDest.setAccessible(false);
|
||||||
|
@ -150,6 +150,12 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager {
|
||||||
if (tDev == null) {
|
if (tDev == null) {
|
||||||
return new MulReturnType<>(ErrorCode.ERR_NOSUCHDEVICE, -1L);
|
return new MulReturnType<>(ErrorCode.ERR_NOSUCHDEVICE, -1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 过滤不允许修改的值
|
||||||
|
dev.setUrlPath(null);
|
||||||
|
dev.setUserName(null);
|
||||||
|
dev.setUrlType(null);
|
||||||
|
dev.setPassword(null);
|
||||||
|
|
||||||
// 更新值
|
// 更新值
|
||||||
upgradeDisposeDeviceProperties(tDev, dev);
|
upgradeDisposeDeviceProperties(tDev, dev);
|
||||||
|
@ -237,7 +243,7 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager {
|
||||||
// 获取分页信息
|
// 获取分页信息
|
||||||
PageInfo<DisposeDevice> pageInfo = new PageInfo<>(devList);
|
PageInfo<DisposeDevice> pageInfo = new PageInfo<>(devList);
|
||||||
|
|
||||||
if(devList.size() > 0) {
|
if (devList.size() > 0) {
|
||||||
// 返回实际数据
|
// 返回实际数据
|
||||||
List<Long> idArray = devList.stream().map(DisposeDevice::getId).collect(Collectors.toList());
|
List<Long> idArray = devList.stream().map(DisposeDevice::getId).collect(Collectors.toList());
|
||||||
rspList.addAll(disposeDeviceMapper.selectByIdSet(idArray));
|
rspList.addAll(disposeDeviceMapper.selectByIdSet(idArray));
|
||||||
|
|
Loading…
Reference in New Issue