liusheng
2024-06-21 ecda68f9ffbd4e0f01d3939550906f670b1e0482
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MinioFileController.java
@@ -37,8 +37,8 @@
     * 查询【请填写功能名称】列表
     */
    @PreAuthorize("@ss.hasPermi('system:file:list')")
    @GetMapping("/list")
    public TableDataInfo list(MinioFile minioFile) {
   @PostMapping("/list")
    public TableDataInfo list(@RequestBody MinioFile minioFile) {
        startPage();
        List<MinioFile> list = minioFileService.selectMinioFileList(minioFile);
        return getDataTable(list);
@@ -70,7 +70,7 @@
     */
    @PreAuthorize("@ss.hasPermi('system:file:add')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
    @PostMapping
    @PostMapping("/add")
    public AjaxResult add(@RequestBody MinioFile minioFile) {
        return toAjax(minioFileService.insertMinioFile(minioFile));
    }
@@ -80,7 +80,7 @@
     */
    @PreAuthorize("@ss.hasPermi('system:file:edit')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
    @PutMapping
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody MinioFile minioFile) {
        return toAjax(minioFileService.updateMinioFile(minioFile));
    }
@@ -90,7 +90,7 @@
     */
    @PreAuthorize("@ss.hasPermi('system:file:remove')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(minioFileService.deleteMinioFileByIds(ids));
    }
@@ -106,7 +106,7 @@
    @ResponseBody
    @ApiOperation(value = "上传文件到文件管理,支持批量上传")
    @ApiImplicitParam(name = "files", value = "文件对象", dataType = "File")
    public AjaxResult commonUploadFile(@RequestParam("path") String path, @RequestParam("files") List<MultipartFile> files) {
    public AjaxResult commonUploadFile(@RequestParam(value = "path",required = false) String path, @RequestParam("files") List<MultipartFile> files) {
        if (CollectionUtils.isEmpty(files)) {
            return error("未选择文件!");
        }