From d4f52b82b82afa4cc43213ad22f536f80af1be9b Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Tue, 8 Dec 2020 10:59:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EAPP=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/apis/file/FileAppController.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cloud-common-plugin/src/main/java/com/cm/common/plugin/controller/app/apis/file/FileAppController.java b/cloud-common-plugin/src/main/java/com/cm/common/plugin/controller/app/apis/file/FileAppController.java index 6713394..6bbac42 100644 --- a/cloud-common-plugin/src/main/java/com/cm/common/plugin/controller/app/apis/file/FileAppController.java +++ b/cloud-common-plugin/src/main/java/com/cm/common/plugin/controller/app/apis/file/FileAppController.java @@ -7,6 +7,7 @@ import com.cm.common.constants.ISystemConstant; import com.cm.common.enums.UploadTypeEnum; import com.cm.common.exception.base.SystemException; import com.cm.common.plugin.service.file.IFileService; +import com.cm.common.pojo.dtos.FileDTO; import com.cm.common.result.ErrorResult; import com.cm.common.result.SuccessResultData; import io.swagger.annotations.*; @@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; +import java.util.Arrays; +import java.util.List; import java.util.Map; /** @@ -102,6 +105,17 @@ public class FileAppController extends AbstractController { return fileService.wangEditorImage(image, UploadTypeEnum.IMAGE, params); } + @ApiOperation(value = "文件列表", notes = "文件列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "id列表,逗号分隔", paramType = "query") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listfilebyids") + public List listFileByFileId(@RequestParam("ids") String ids) { + List idList = Arrays.asList(ids.split(",")); + return fileService.listFileByFileId(idList); + } + /** * 上传文件 *