|
|
@@ -0,0 +1,37 @@
|
|
|
+package com.purui.ghip.feign;
|
|
|
+
|
|
|
+import com.purui.ghip.model.MessageUpdateRequest;
|
|
|
+import org.springframework.cloud.openfeign.FeignClient;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+
|
|
|
+/**
|
|
|
+ * HIS 服务 Feign 客户端
|
|
|
+ * 用于调用 his-proxy 的消息状态更新接口
|
|
|
+ *
|
|
|
+ * @author zhengjie
|
|
|
+ * @date 2026/1/23
|
|
|
+ */
|
|
|
+@FeignClient(name = "his-proxy", fallback = HisServiceClient.HisServiceClientFallback.class)
|
|
|
+public interface HisServiceClient {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新消息状态
|
|
|
+ * 调用 his-proxy 的消息状态更新接口
|
|
|
+ *
|
|
|
+ * @param request 更新请求(原样传递)
|
|
|
+ * @return 响应体(JSON 字符串)
|
|
|
+ */
|
|
|
+ @PostMapping("/sysInternalMutiple")
|
|
|
+ String bdhealth(@RequestBody MessageUpdateRequest request);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * HisServiceClient 降级处理
|
|
|
+ */
|
|
|
+ static class HisServiceClientFallback implements HisServiceClient {
|
|
|
+ @Override
|
|
|
+ public String bdhealth(MessageUpdateRequest request) {
|
|
|
+ return "{\"errorCode\":\"-1\",\"errorMessage\":\"HIS服务不可用\"}";
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|