package com.securitycontrol.system.api;

import com.securitycontrol.common.core.constant.SecurityConstants;
import com.securitycontrol.common.core.constant.ServiceNameConstants;
import com.securitycontrol.common.core.domain.Result;
import com.securitycontrol.system.api.domain.TbSourceFile;
import com.securitycontrol.system.api.factory.RemoteSourceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 资源服务
 *
 * @author czc
 */
@FeignClient(contextId = "remoteSourceService", value = ServiceNameConstants.BACK_SERVICE, fallbackFactory = RemoteSourceFallbackFactory.class)
public interface RemoteSourceService {

    /**
     * 查询资源信息
     * @param sourceId
     * @param sourceType
     * @param source
     * @return
     */
    @PostMapping(value = "/source/file/getSourceList")
    Result<List<TbSourceFile>> getSourceFile(@RequestParam("sourceId") String sourceId, @RequestParam("sourceType") String sourceType, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);


}
