package com.ho.user.feignclient;

import com.ho.common.tools.exception.BaseResponseCode;
import com.ho.common.tools.exception.BusinessException;
import com.ho.common.tools.exception.DataResult;
import com.ho.flow.entity.SendSmsConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Description flow模块的失败回滚
 * Author yule
 * Date 2023/3/28 10:23
 */
@Component
@Slf4j
public class FlowFeignClientFallback implements FlowFeignClient{

    @Override
    public DataResult deploymentWorkflow(Integer groupId) {
        log.error("调用 [FlowFeignClient.selectWorkOrderByStationId] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public void updateSendSmsUserInfo(SendSmsConfig vo) {
        log.error("调用 [FlowFeignClient.updateSendSmsUserInfo] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }
}
