mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-22 01:30:40 +08:00
完成文件对象管理刷新状态功能
This commit is contained in:
@@ -78,7 +78,7 @@ public class FileObjectServiceImpl implements FileObjectService {
|
||||
}
|
||||
|
||||
private FileObjectModel convertFromDataObject(FileObjectDO fileObjectDO) throws InvocationTargetException, IllegalAccessException {
|
||||
if(fileObjectDO == null) {
|
||||
if (fileObjectDO == null) {
|
||||
return null;
|
||||
}
|
||||
FileObjectModel fileObjectModel = new FileObjectModel();
|
||||
@@ -103,7 +103,7 @@ public class FileObjectServiceImpl implements FileObjectService {
|
||||
}
|
||||
|
||||
private FileObjectDO convertFromFileObjectModel(FileObjectModel fileObjectModel) {
|
||||
if(fileObjectModel == null) {
|
||||
if (fileObjectModel == null) {
|
||||
return null;
|
||||
}
|
||||
FileObjectDO fileObjectDO = new FileObjectDO();
|
||||
@@ -213,7 +213,7 @@ public class FileObjectServiceImpl implements FileObjectService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过文件路径获取文件
|
||||
* 通过文件路径获取文件对象
|
||||
*
|
||||
* @param filePath 文件路径
|
||||
* @return
|
||||
@@ -224,4 +224,19 @@ public class FileObjectServiceImpl implements FileObjectService {
|
||||
FileObjectModel fileObjectModel = convertFromDataObject(fileObjectDO);
|
||||
return fileObjectModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过 Id 获取文件对象
|
||||
*
|
||||
* @param fileObjectId 文件对象 Id
|
||||
* @return
|
||||
* @throws InvocationTargetException
|
||||
* @throws IllegalAccessException
|
||||
*/
|
||||
@Override
|
||||
public FileObjectModel getFileObjectById(Integer fileObjectId) throws InvocationTargetException, IllegalAccessException {
|
||||
FileObjectDO fileObjectDO = fileObjectDOMapper.selectByPrimaryKey(fileObjectId);
|
||||
FileObjectModel fileObjectModel = convertFromDataObject(fileObjectDO);
|
||||
return fileObjectModel;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user