From 64c9ab17a187d6087acbda902c01d14f5707922a Mon Sep 17 00:00:00 2001 From: houruijun <411269194@kidgrow.com> Date: Sun, 28 Jun 2020 16:34:36 +0800 Subject: [PATCH] 1.调整扣费业务支持feign调用 2.更新运营平台支持统一格式化时间 3.修改zuu网关,增加请求头doctorId字段,修改departmentId字段的取值 --- 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