package com.ho.xxljob.feignclient;

import com.ho.business.vo.req.MonitorQuery;
import com.ho.common.tools.constant.ContextConstant;
import com.ho.common.tools.exception.BaseResponseCode;
import com.ho.common.tools.exception.BusinessException;
import com.ho.common.tools.exception.DataResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @Description flow模块远程调用失败策略
 * Author yule
 * Date 2023/3/17 10:22
 */

@Component
public class FlowFeignClientFallback implements FlowFeignClient{
    Logger log = LoggerFactory.getLogger(getClass());

    @Override
    public void accessPointEvent() {
        log.error(" FlowFeignClient.accessPointEvent error!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public void deletedPicture() {
        log.error(" FlowFeignClient.deletedPicture error!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public void regularlySendNotifications(MonitorQuery monitorQuery) {
        log.error(" FlowFeignClient.deletedPicture error!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

}
