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.TargetWarnFeignClientFallbackFactory;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
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 = "/alarmDetail",//对应controller请求类
        fallbackFactory = TargetWarnFeignClientFallbackFactory.class//服务降级处理类
)
public interface TargetWarnFeignClient {

    @PostMapping("/targetDiff")
    HttpResult<Boolean> targetDiff(@RequestBody @Validated LineParam lineParam);

    @PostMapping("/alarmDay")
    HttpResult<Boolean> alarmDay(@RequestBody @Validated LineParam lineParam);

    @PostMapping("/alarmMonth")
    HttpResult<Boolean> alarmMonth(@RequestBody @Validated LineParam lineParam);

}
