package com.tofly.base.api.feign;

import com.tofly.base.api.entity.Log;
import com.tofly.base.api.feign.factory.BaseEsLogServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 * @date 2019/9/3  14:54
 */
@FeignClient( contextId = "baseEsLogService",value = "tofly-es",fallbackFactory = BaseEsLogServiceFallbackFactory.class)
public interface BaseEsLogService {

    @PostMapping("/log/add")
    boolean saveLog(@RequestBody Log log);


    @GetMapping("/log/pageNew")
    List queryLog(@RequestParam Map map);
}
