mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-21 01:10:39 +08:00
登陆过期重新登录跳回原来页面;管理员后台文件详情页面文件详情和关联文件对象
This commit is contained in:
@@ -55,11 +55,11 @@ public class FileController extends BaseController {
|
||||
VisitorFingerprintLogServiceImpl visitorFingerprintLogService;
|
||||
|
||||
@ApiOperation(value = "书籍下载页面获取文件提供的下载方式", notes = "")
|
||||
@RequestMapping(value = "getFile", method = {RequestMethod.GET})
|
||||
@RequestMapping(value = "getFileByBookId", method = {RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public CommonReturnType getFile(@RequestParam(value = "bookId", required = false) Integer bookId) throws BusinessException, InvocationTargetException, IllegalAccessException {
|
||||
public CommonReturnType getFileByBookId(@RequestParam(value = "bookId", required = false) Integer bookId) throws BusinessException, InvocationTargetException, IllegalAccessException {
|
||||
|
||||
List<FileModel> fileModels = fileService.getFile(bookId);
|
||||
List<FileModel> fileModels = fileService.getFileByBookId(bookId);
|
||||
List<FileVO> fileVOS = new ArrayList<>();
|
||||
for (FileModel fileModel : fileModels) {
|
||||
FileVO fileVO = convertFileVOFromModel(fileModel);
|
||||
@@ -80,6 +80,15 @@ public class FileController extends BaseController {
|
||||
return CommonReturnType.create(map);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过 fileId 获取文件信息", notes = "")
|
||||
@RequestMapping(value = "getFileById", method = {RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public CommonReturnType getFileById(@RequestParam(value = "fileId", required = false) Integer fileId) throws BusinessException, InvocationTargetException, IllegalAccessException {
|
||||
FileModel fileModel = fileService.getFileById(fileId);
|
||||
FileVO fileVO = convertFileVOFromModel(fileModel);
|
||||
return CommonReturnType.create(fileVO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "【管理员】查询文件列表", notes = "查询文件列表")
|
||||
@RequestMapping(value = "list", method = {RequestMethod.POST}, consumes = {CONTENT_TYPE_FORMED})
|
||||
@ResponseBody
|
||||
|
@@ -112,6 +112,20 @@ public class FileObjectController extends BaseController {
|
||||
return CommonReturnType.create(fileObjectVOS);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询指定文件的文件对象列表", notes = "传入文件Id,返回文件对象列表")
|
||||
@RequestMapping(value = "getByFileId", method = {RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public CommonReturnType getFileObjectByFileId(@RequestParam(value = "fileId", required = false) Integer fileId) throws InvocationTargetException, IllegalAccessException, BusinessException {
|
||||
|
||||
List<FileObjectModel> fileObjectModels = fileObjectService.getFileObjectListByFileId(fileId);
|
||||
List<FileObjectVO> fileObjectVOS = new ArrayList<>();
|
||||
for (FileObjectModel fileObjectModel : fileObjectModels) {
|
||||
FileObjectVO fileObjectVO = convertFileObjectVOFromModel(fileObjectModel);
|
||||
fileObjectVOS.add(fileObjectVO);
|
||||
}
|
||||
return CommonReturnType.create(fileObjectVOS);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "【管理员】更新文件对象上传状态", notes = "重新从 COS 对象存储中获取文件对象上传状态")
|
||||
@RequestMapping(value = "refreshFileObjectStatus", method = {RequestMethod.POST}, consumes = {CONTENT_TYPE_FORMED})
|
||||
@ResponseBody
|
||||
|
Reference in New Issue
Block a user