package com.yanzhu.jh.bigscreen.web.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.yanzhu.jh.work.domain.WorkFile;
import com.yanzhu.jh.work.service.IWorkFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 工作传达文件Conller
 */
@RestController
@RequestMapping("/bgscreen/workfile")
public class BgWorkFileController extends BaseController {

    @Autowired
    IWorkFileService workFileService;

    /**
     * 根据文件归属查询文件
     * @param fileBelong
     * @return
     */
    @GetMapping("/getWorkFileList")
    public TableDataInfo getWorkFileList(String fileBelong){
        WorkFile workFile = new WorkFile();
        workFile.setFileBelong(fileBelong);
        return getDataTable(workFileService.selectWorkFileListLimit20(workFile));
    }

}
