From a2ef34a807b1f88ac9b18dae51adbf61ce821595 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期四, 05 三月 2026 11:31:40 +0800
Subject: [PATCH] RCS对接优化

---
 rsf-open-api/src/main/java/com/vincent/rsf/openApi/entity/dto/CommonResponse.java |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/rsf-open-api/src/main/java/com/vincent/rsf/openApi/entity/dto/CommonResponse.java b/rsf-open-api/src/main/java/com/vincent/rsf/openApi/entity/dto/CommonResponse.java
index 0e89156..cf25342 100644
--- a/rsf-open-api/src/main/java/com/vincent/rsf/openApi/entity/dto/CommonResponse.java
+++ b/rsf-open-api/src/main/java/com/vincent/rsf/openApi/entity/dto/CommonResponse.java
@@ -25,4 +25,24 @@
     @ApiModelProperty("鍝嶅簲缁撴灉")
     private Object data;
 
+    public static CommonResponse ok() {
+        CommonResponse r = new CommonResponse();
+        r.setCode(200);
+        r.setMsg("鎿嶄綔鎴愬姛");
+        return r;
+    }
+
+    /** 8.2.3 鏍煎紡锛氭垚鍔熶笖 data 浠呭惈 result */
+    public static CommonResponse okWithResult() {
+        return ok().setData(ResultData.success());
+    }
+
+    public static CommonResponse error(String msg) {
+        CommonResponse r = new CommonResponse();
+        r.setCode(500);
+        r.setMsg(msg != null ? msg : "鎿嶄綔澶辫触");
+        r.setData(ResultData.fail());
+        return r;
+    }
+
 }

--
Gitblit v1.9.1