【修改】去除error500方法,全都替换为error
【修改】修改token过期,但是接口访问依然不返回登录页的bug
This commit is contained in:
+3
-3
@@ -53,7 +53,7 @@ public class OSSFileController {
|
||||
}
|
||||
catch (Exception ex) {
|
||||
log.info(ex.getMessage(), ex);
|
||||
return Result.error500("上传失败");
|
||||
return Result.error("上传失败");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class OSSFileController {
|
||||
public Result delete(@RequestParam(name = "id") String id) {
|
||||
OSSFile file = ossFileService.getById(id);
|
||||
if (file == null) {
|
||||
return Result.error500("未找到对应实体");
|
||||
return Result.error("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = ossFileService.delete(file);
|
||||
if (ok) {
|
||||
@@ -81,7 +81,7 @@ public class OSSFileController {
|
||||
Result<OSSFile> result = new Result<>();
|
||||
OSSFile file = ossFileService.getById(id);
|
||||
if (file == null) {
|
||||
result.error500("未找到对应实体");
|
||||
return Result.error("未找到对应实体");
|
||||
}
|
||||
else {
|
||||
result.setResult(file);
|
||||
|
||||
Reference in New Issue
Block a user