package com.dcsoft.system.api;

import com.dcsoft.common.core.constant.SecurityConstants;
import com.dcsoft.common.core.constant.ServiceNameConstants;
import com.dcsoft.common.core.domain.R;
import com.dcsoft.system.api.domain.SysAuth;
import com.dcsoft.system.api.domain.SysLogininfor;
import com.dcsoft.system.api.domain.SysOperLog;
import com.dcsoft.system.api.factory.RemoteLogFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 日志服务
 *
 * @author dcsoft
 */
@FeignClient(contextId = "remoteAuthService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteAuthService
{
    /**
     * 保存系统日志
     *
     * @param id appkey
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/auth/{id}")
    public R<SysAuth> getAuth(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
