package com.securitycontrol.background.controller;

import com.securitycontrol.background.service.SourceFileService;
import com.securitycontrol.common.core.domain.Result;
import com.securitycontrol.entity.file.FileExportVo;
import com.securitycontrol.system.api.domain.TbSourceFile;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 资源文件接口层
 * @author 黑子
 */
@RestController
@RequestMapping("/source/file/")
@Slf4j
public class SourceFileController {

    @Autowired
   private  SourceFileService service;

    @PostMapping("getSourceList")
    public Result<List<TbSourceFile>> getSourceList(@RequestParam(value = "sourceId") String sourceId, @RequestParam("sourceType") String sourceType){
            List<TbSourceFile> list= service.getTbSourceList(sourceId,sourceType);
        return Result.ok(list);
    }


}
