package com.njcn.csharmonic.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csharmonic.api.fallback.EventUserFeignClientFallbackFactory;
import com.njcn.csharmonic.param.CsEventUserQueryParam;
import com.njcn.csharmonic.pojo.po.CsEventPO;
import com.njcn.csharmonic.pojo.po.CsEventUserPO;
import com.njcn.csharmonic.pojo.vo.EventDetailVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author xy
 */
@FeignClient(value = ServerInfo.CS_HARMONIC_BOOT, path = "/eventUser", fallbackFactory = EventUserFeignClientFallbackFactory.class,contextId = "eventUser")
public interface EventUserFeignClient {


    @PostMapping("/queryEventList")
    HttpResult<List<EventDetailVO>> queryEventList(@RequestBody CsEventUserQueryParam csEventUserQueryParam) ;

    @PostMapping("/addUserEventList")
    HttpResult<Boolean> addUserEventList(@RequestBody List<CsEventUserPO> list);

    @PostMapping("/deleteByIds")
    HttpResult<Boolean> deleteByIds(@RequestBody List<String> eventList);

    @PostMapping("/queryTempEvent")
    @ApiOperation("查询暂态事件(未读)")
    HttpResult<List<String>> queryTempEvent(@RequestBody CsEventUserQueryParam param);

    @PostMapping("/queryTempEventDetail")
    @ApiOperation("查询暂态事件详细信息(未读)")
    HttpResult<List<CsEventPO>> queryTempEventDetail(@RequestBody CsEventUserQueryParam param);

    @PostMapping("/queryTempHarmonic")
    @ApiOperation("查询稳态事件(未读)")
    HttpResult<List<String>> queryTempHarmonic(@RequestBody CsEventUserQueryParam param);

    @PostMapping("/queryAlarmEvent")
    @ApiOperation("查询告警事件(未读)")
    HttpResult<List<String>> queryAlarmEvent(@RequestBody CsEventUserQueryParam param);

    @PostMapping("/queryRunEvent")
    @ApiOperation("查询运行事件(未读)")
    HttpResult<List<String>> queryRunEvent(@RequestBody CsEventUserQueryParam param);
}
