package com.ruoyi.web.controller.file;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.file.model.FileModel;
import com.ruoyi.file.model.FileSystemFilter;
import com.ruoyi.file.service.FileSystemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 文件系统Controller
 * 
 * @author zhao
 * @date 2023-10-19
 */
@Api(tags = "文件系统")
@RestController
@RequestMapping("/filesystem")
public class FileSystemController extends BaseController
{
    @Autowired
    private FileSystemService fileSystemService;

    /**
     * 查询项目列表
     */
    @ApiOperation("查询项目列表")
    @PreAuthorize("@ss.hasPermi('file:project:list')")
    @GetMapping("/ls")
    public AjaxResult ls(FileSystemFilter filter)
    {
        startPage();
        List<FileModel> list = fileSystemService.ls(filter);
        return AjaxResult.success(list);
    }

}
