package com.tofly.base.api.feign;

import com.tofly.base.api.entity.Log;
import com.tofly.base.api.feign.factory.BaseLogServiceFallbackFactory;
import com.tofly.common.core.constant.SecurityConstants;
import com.tofly.common.core.entity.ResultRespone;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author Administrator
 * @date 2019/9/3  14:54
 */
@FeignClient( contextId = "baseLogService",value = "tofly-base",fallbackFactory = BaseLogServiceFallbackFactory.class)
public interface BaseLogService {

    @PostMapping("/log/add")
    ResultRespone saveLog(@RequestBody Log log, @RequestHeader(SecurityConstants.FROM) String from);
}
