fix: 分组添加bug修复

V0.5.x
gaoyoulong 2024-03-14 20:27:24 +08:00
parent c9d8a8ffd6
commit 4493359468
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 dbGroup = deviceGroupData.findById(group.getId());
if (dbGroup == null) {
throw new BizException(ErrCode.GROUP_NOT_FOUND);
// 如果不存在,则添加分组
return addGroup(group);
// throw new BizException(ErrCode.GROUP_NOT_FOUND);
}
dataOwnerService.checkOwner(dbGroup);
ReflectUtil.copyNoNulls(group, dbGroup);