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); + } + /** * 上传文件 *