package com.bawei.es.remote;

import com.bawei.common.core.constant.ServiceNameConstants;
import com.bawei.common.core.domain.R;
import com.bawei.common.core.web.domain.AjaxResult;
import com.bawei.es.remote.factory.EsDocRemoteFactory;
import com.bawei.es.remote.factory.EsIndexRemoteFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;
@FeignClient(contextId = "EsDocRemoteService", value = ServiceNameConstants.ES_SERVICE,
        fallbackFactory = EsDocRemoteFactory.class,
        path = "/doc")
public interface EsDocRemoteService {
    @GetMapping("/queryList/{indexName}")
    public R queryList(@PathVariable("indexName") String indexName, @RequestParam Map<String,Object> docMsg);
    @PutMapping("/batchAddDoc/{indexName}")
    public R batchAddDoc(@PathVariable("indexName") String indexName, @RequestBody Map<String,Object> docMsg);
    @DeleteMapping("/bathDeleteDoc/{indexName}")
    public R bathDeleteDoc(@PathVariable("indexName") String indexName, @RequestBody List<String> ids);
}
