提交 65f3b861 authored 作者: 邓砥奕's avatar 邓砥奕

更新

上级 ab8b3239
...@@ -514,7 +514,12 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -514,7 +514,12 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
@Override @Override
public DeviceLibrary getOne(Integer id) { public DeviceLibrary getOne(Integer id) {
Optional<DeviceLibrary> deviceLibraryEntity = deviceLibraryDao.findById(id); Optional<DeviceLibrary> deviceLibraryEntity = deviceLibraryDao.findById(id);
return deviceLibraryEntity.orElse(null); if (deviceLibraryEntity.isPresent()){
return deviceLibraryEntity.get().setConfigName();
}
else {
throw new ApiException("查询的装备Id不存在");
}
} }
@Override @Override
......
...@@ -156,7 +156,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService { ...@@ -156,7 +156,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
if (!byId.isPresent()) { if (!byId.isPresent()) {
throw new ApiException(ResultUtil.failed("id不存在")); throw new ApiException(ResultUtil.failed("id不存在"));
} else { } else {
return byId.get(); return byId.get().setConfigName();
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论