From 23df781ef8c79800568b43d4255cf3b29087e33d Mon Sep 17 00:00:00 2001 From: houruijun <411269194@kidgrow.com> Date: Thu, 18 Jun 2020 18:12:05 +0800 Subject: [PATCH] 1.修改pom文件,增加版本号可配置 2.整理所有的生成model,增加将long的序列化,日期格式统一格式化注解。 3.修改注册/添加账号接口(未调试) 4.对以前写的代码,事务的回滚做统一 5.增加数据需求的列表/添加数据的接口 6.将限制账户数量从医院表转移到科室表 --- kidgrow-business/kidgrow-filecenter/kidgrow-filecenter-server/src/main/java/com/kidgrow/filecenter/controller/FileController.java | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/kidgrow-business/kidgrow-filecenter/kidgrow-filecenter-server/src/main/java/com/kidgrow/filecenter/controller/FileController.java b/kidgrow-business/kidgrow-filecenter/kidgrow-filecenter-server/src/main/java/com/kidgrow/filecenter/controller/FileController.java index 4fe88b0..0fdd274 100644 --- a/kidgrow-business/kidgrow-filecenter/kidgrow-filecenter-server/src/main/java/com/kidgrow/filecenter/controller/FileController.java +++ b/kidgrow-business/kidgrow-filecenter/kidgrow-filecenter-server/src/main/java/com/kidgrow/filecenter/controller/FileController.java @@ -39,6 +39,30 @@ /** + * 文件上传 + * 根据fileType选择上传方式 + * + * @param file + * @return + * @throws Exception + */ + @PostMapping(value="/files-upload",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE},consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public FileInfo feignUpload(@RequestPart("file") MultipartFile file,@RequestParam String imgType) throws Exception { + return fileService.upload(file,imgType); + } + /** + * 文件上传 返回带缩略图地址的对象,缩略图在path字段 + * + * @param file + * @return + * @throws Exception + */ + @PostMapping(value="/files-thupload",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE},consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public FileInfo thUpload(@RequestPart("file") MultipartFile file,@RequestParam String imgType) throws Exception { + return fileService.uploadForThumbnails(file,imgType); + } + + /** * 文件删除 * * @param id -- Gitblit v1.8.0