提交 65fd579b authored 作者: chaoyanjun's avatar chaoyanjun

--no commit message

上级 213ba3fb
...@@ -85,12 +85,12 @@ public class FileController { ...@@ -85,12 +85,12 @@ public class FileController {
// 处理文件上传 // 处理文件上传
@ApiOperation(value = "文件上传 返回唯一标识") @ApiOperation(value = "文件上传 返回唯一标识")
@RequestMapping(value = "/upload", method = RequestMethod.POST) @RequestMapping(value = "/upload", method = RequestMethod.POST)
public String uploadImg(@RequestParam("file") MultipartFile file, HttpServletRequest request) { public CallBack<String> uploadImg(@RequestParam("file") MultipartFile file, HttpServletRequest request) throws Exception {
FileInfo entity = service.uploadFile(file); FileInfo entity = service.uploadFile(file);
if (!service.insert(entity)) { if(!service.insert(entity)){
throw new BaseException("上传失败!"); throw new BaseException("上传失败!");
} }
return entity.getFileName(); return CallBack.success(entity.getFileName());
} }
@ApiOperation(value = "生成二维码 返回唯一标识") @ApiOperation(value = "生成二维码 返回唯一标识")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论