feat: 修正返回文件信息的类型

根据最新需求,/obtainLastFile接口现在返回OSSFile对象而不是id。这提供了更多文件信息,而不仅仅是文件ID。
This commit is contained in:
2024-10-12 14:44:53 +08:00
parent 8b31296940
commit dbc80ed443
@@ -223,7 +223,7 @@ public class OnlyOfficeController {
*/
@ApiOperation(value = "根据id获取最新版本的文件信息")
@GetMapping("/obtainLastFile")
public Result<String> obtainLastFile(String id) {
public Result<OSSFile> obtainLastFile(String id) {
if (StringUtils.isBlank(id)) {
return Result.error("id不能为空!");
}
@@ -233,7 +233,7 @@ public class OnlyOfficeController {
wrapper.orderByDesc(OSSFile::getCreateTime);
wrapper.last("limit 1");
OSSFile lastFile = ossFileService.getOne(wrapper);
return Result.OK(MessageUtils.getMessage(ResultCommon.OK), lastFile.getId());
return Result.OK(MessageUtils.getMessage(ResultCommon.OK), lastFile);
}
}