package com.hw.ems.api;

import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.constant.ServiceNameConstants;
import com.hw.common.core.domain.R;
import com.hw.ems.api.factory.RemoteEmsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @ClassName : RemoteEmsService
 * @Description : zhouhy
 * @Author :
 * @Date: 2023-12-25 17:07
 */
@FeignClient(contextId = "remoteEmsService", value = ServiceNameConstants.EMS_SERVICE, fallbackFactory = RemoteEmsFallbackFactory.class)
public interface RemoteEmsService {
    @PostMapping("/record/dnbInstant/getDnbInstant")
    R<?> getDnbInstantByJob(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);


    @PostMapping("/record/alarmData/thresholdTimingTask")
    R<?> thresholdTimingTask(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/record/alarmData/deviceOfflineTimingTask")
    R<?> deviceOfflineTimingTask(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
