package cn.ezhizao.project.system.controller;

import cn.ezhizao.framework.web.controller.BaseController;
import cn.ezhizao.framework.web.page.TableDataInfo;
import cn.ezhizao.project.system.domain.SysFileStorage;
import cn.ezhizao.project.system.service.ISysFileStorageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/system/file")
public class SysFileStorageController extends BaseController {
    @Resource
    private ISysFileStorageService sysFileStorageService;

    @GetMapping("/list")
    @ResponseBody
    public TableDataInfo list(SysFileStorage conditions) throws NoSuchFieldException, IllegalAccessException
    {
        startPage();
        List<SysFileStorage> list = sysFileStorageService.getList(conditions);
        return getDataTable(list);
    }
}
