Merge branch 'dev-V0.5.0' of https://gitee.com/open-iita/iotkit-parent into dev-V0.5.0

V0.5.x
xiwa 2024-03-16 10:24:16 +08:00
commit 8ab1ffab38
1 changed files with 3 additions and 1 deletions

View File

@ -285,7 +285,9 @@ public class DeviceManagerServiceImpl implements IDeviceManagerService {
DeviceGroup group = bo.to(DeviceGroup.class); DeviceGroup group = bo.to(DeviceGroup.class);
DeviceGroup dbGroup = deviceGroupData.findById(group.getId()); DeviceGroup dbGroup = deviceGroupData.findById(group.getId());
if (dbGroup == null) { if (dbGroup == null) {
throw new BizException(ErrCode.GROUP_NOT_FOUND); // 如果不存在,则添加分组
return addGroup(group);
// throw new BizException(ErrCode.GROUP_NOT_FOUND);
} }
dataOwnerService.checkOwner(dbGroup); dataOwnerService.checkOwner(dbGroup);
ReflectUtil.copyNoNulls(group, dbGroup); ReflectUtil.copyNoNulls(group, dbGroup);