package com.njcn.prepare.harmonic.api.line;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.prepare.harmonic.api.line.fallback.ThsSuperviseClientFallbackFactory;
import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        value = ServerInfo.PREPARE_BOOT,//对应模块名
        path = "/thsSupervise",//对应controller请求类
        fallbackFactory = ThsSuperviseClientFallbackFactory.class//服务降级处理类
)
public interface ThsSuperviseClient {
    /**
     * 预警/告警事务的初始化
     *
     * @param superviseParam
     * @return
     */
    @PostMapping("/initSupervise")
    HttpResult<String> initSupervise(@RequestBody @Validated SuperviseParam superviseParam);


    /**
     * 预警/告警事务的生成
     *
     * @param superviseParam
     * @return
     */
    @PostMapping("/creatSupervise")
    HttpResult<String> creatSupervise(@RequestBody @Validated SuperviseParam superviseParam);
}
