From 1678987834d2e37c2bb6b1c2577c35977dbb2195 Mon Sep 17 00:00:00 2001
From: lbq <1065079612@qq.com>
Date: 星期四, 08 一月 2026 16:25:22 +0800
Subject: [PATCH] ERP和MES对接接口模拟实现(待内部对接),接口映射初步工具实现(待应用)

---
 rsf-open-api/src/main/java/com/vincent/rsf/openApi/entity/dto/CommonResponse.java |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 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..6a9c23d 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
@@ -1,5 +1,6 @@
 package com.vincent.rsf.openApi.entity.dto;
 
+import com.alibaba.fastjson.JSONObject;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -25,4 +26,35 @@
     @ApiModelProperty("鍝嶅簲缁撴灉")
     private Object data;
 
+    /**
+     * 鎴愬姛鍝嶅簲
+     */
+    public static CommonResponse ok() {
+        CommonResponse response = new CommonResponse();
+        response.setCode(200);
+        response.setMsg("鎿嶄綔鎴愬姛");
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("result", "SUCCESS");
+        response.setData(jsonObject);
+        return response;
+    }
+
+    public static CommonResponse ok(Object data) {
+        CommonResponse response = new CommonResponse();
+        response.setCode(200);
+        response.setMsg("鎿嶄綔鎴愬姛");
+        response.setData(data);
+        return response;
+    }
+
+    /**
+     * 澶辫触鍝嶅簲
+     */
+    public static CommonResponse error(String msg) {
+        CommonResponse response = new CommonResponse();
+        response.setCode(500);
+        response.setMsg(msg);
+        return response;
+    }
+
 }

--
Gitblit v1.9.1