From b0cc9bd3619e69fa4c8bbdedebb56435cfd74a8f Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期五, 17 一月 2025 11:24:51 +0800
Subject: [PATCH] 12.18

---
 ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/TechnicianClientFallbackFactory.java |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/TechnicianClientFallbackFactory.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/TechnicianClientFallbackFactory.java
new file mode 100644
index 0000000..91faaeb
--- /dev/null
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/TechnicianClientFallbackFactory.java
@@ -0,0 +1,32 @@
+package com.ruoyi.other.api.factory;
+
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.other.api.domain.Technician;
+import com.ruoyi.other.api.domain.TechnicianSubscribe;
+import com.ruoyi.other.api.feignClient.TechnicianClient;
+import org.springframework.cloud.openfeign.FallbackFactory;
+
+import java.util.Collection;
+import java.util.List;
+
+public class TechnicianClientFallbackFactory implements FallbackFactory<TechnicianClient> {
+    @Override
+    public TechnicianClient create(Throwable cause) {
+        return new TechnicianClient() {
+            @Override
+            public R<Technician> shopdetail(Integer techId) {
+                return R.fail("根据省市区获取地区价格配置失败:" + cause.getMessage());
+            }
+
+            @Override
+            public R<Void> updateStatus(Integer status, Long subscribeId) {
+                return R.fail("跟新技师预约状态失败:" + cause.getMessage());
+            }
+
+            @Override
+            public R<List<Technician>> getTechnicianByIds(Collection<Integer> ids) {
+                return R.fail("根据技师ids查询数据失败:" + cause.getMessage());
+            }
+        };
+    }
+}

--
Gitblit v1.7.1