package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.factory.RemoteLogFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 日志服务
 * 
 * @author ruoyi
 */
@FeignClient(contextId = "remoteJobDataExchangeService", value = ServiceNameConstants.SYSTEM_SERVICE_DATAEXCHANGE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteJobDataExchangeService
{
    /**
     * 文件打包
     *
     * @param params 参数 文件打包配置主键
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/package")
    public R<Boolean> filePackage(@RequestParam("exchangePackageId") String params, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;

    /**
     *
     * @param params 参数 文件解析配置主键
     * @param source 请求来源
     * @return 结果
     * @throws Exception
     */
    @GetMapping("/packageResolve")
    public R<Boolean> filePackageResolve(@RequestParam("exchangeResolveId") String params, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;

    /**
     *
     * @param params 参数 文件解析配置主键
     * @param source 请求来源
     * @return 结果
     * @throws Exception
     */
    @GetMapping("/inBusiness")
    public R<Boolean> inBusiness(@RequestParam("exchangeResolveId") String params, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
}
