package com.bonus.system.controller;

import com.bonus.common.core.domain.R;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.system.api.domain.SysFileSource;
import com.bonus.system.api.domain.SysUser;
import com.bonus.system.api.model.LoginUser;
import com.bonus.system.service.SysFileSourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Set;

@RestController
@RequestMapping("/fileSource")
public class SysFileSourceController {


    @Autowired
    private SysFileSourceService service;
    /**
     * 新增资源i想你洗
     */
    @InnerAuth
    @PostMapping("/addFileSource")
    public R<Boolean> addFileSource(@RequestBody SysFileSource fileSource) {
         return  service.addFileSource(fileSource);
    }
    /**
     * 删除资源信息
     */
    @InnerAuth
    @PostMapping("/delSourceFile")
    public R<Boolean> delSourceFile(@RequestBody SysFileSource fileSource) {
        return  service.delSourceFile(fileSource);
    }



    /**
     * 获取当前用户信息
     */
    @InnerAuth
    @PostMapping("/getSourceFileList")
    public R<List<SysFileSource>> getSourceFileList(@RequestBody String sourceId) {
        return  service.getSourceFileList(sourceId);
    }



}
