Pu Zhibing
2025-03-24 a88ba6b7606a73086cadb02c6115c3c01ce03f3e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.ruoyi.dataInterchange.api.factory;
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.dataInterchange.api.feignClient.RealVideoMsgClient;
import com.ruoyi.dataInterchange.api.vo.UPRealvideoMsgStartupAckVo;
import org.springframework.cloud.openfeign.FallbackFactory;
 
/**
 * @author zhibing.pu
 * @Date 2025/3/24 16:18
 */
public class RealVideoMsgClientFallbackFactory implements FallbackFactory<RealVideoMsgClient> {
@Override
    public RealVideoMsgClient create(Throwable cause) {
        return new RealVideoMsgClient() {
        @Override
            public R<UPRealvideoMsgStartupAckVo> startupRealVideo(Integer inferiorPlatformId, String vehicleNo) {
                return R.fail("发起实时音视频请求失败:" + cause.getMessage());
            }
        };
    }
}