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
|
||||
|
Reference in New Issue
Block a user