From 52cd0fe6f2224b0bd17b19ddaf475406a92b9ed4 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 09 五月 2025 13:42:00 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/RmiResponseVo.java | 78 +++++++++++++++++++++++++++++++++++++++
1 files changed, 78 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/RmiResponseVo.java b/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/RmiResponseVo.java
new file mode 100644
index 0000000..853f77d
--- /dev/null
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/RmiResponseVo.java
@@ -0,0 +1,78 @@
+package com.dy.testServer.forRmi;
+
+import com.alibaba.fastjson2.JSON;
+
+public class RmiResponseVo {
+
+ public boolean success = true ;
+
+ public String errorInfo ;
+
+ public String code ;
+
+ public Object obj ;
+
+ /**
+ * 瀵硅薄杞垚json
+ * @return json
+ * @throws Exception 寮傚父
+ */
+ public String toJson()throws Exception{
+ try{
+ return JSON.toJSONString(this) ;
+ //return new JSONSerializer().exclude(new String[]{"class", "*.class"}).deepSerialize(this);
+ }catch(Exception e){
+ throw new Exception(e.getMessage() , e ) ;
+ }
+ }
+ /**
+ * json杞垚瀵硅薄
+ * @param json
+ * @param clazz
+ * @return 瀵硅薄
+ * @throws Exception 寮傚父
+ */
+ public static RmiResponseVo jsonToObject(String json, Class<?> clazz)throws Exception{
+ try{
+ return JSON.parseObject(json, RmiResponseVo.class) ;
+ //JSONDeserializer<RmiResponseVo> jsonD = new JSONDeserializer<>() ;
+ //jsonD.use("obj", clazz) ;
+ //RmiResponseVo resp = jsonD.deserialize(json, RmiResponseVo.class) ;
+ //return resp ;
+ }catch(Exception e){
+ throw new Exception(e.getMessage() , e ) ;
+ }
+ }
+
+ public boolean isSuccess() {
+ return success;
+ }
+
+ public void setSuccess(boolean success) {
+ this.success = success;
+ }
+
+ public String getErrorInfo() {
+ return errorInfo;
+ }
+
+ public void setErrorInfo(String errorInfo) {
+ this.errorInfo = errorInfo;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public Object getObj() {
+ return obj;
+ }
+
+ public void setObj(Object obj) {
+ this.obj = obj;
+ }
+}
--
Gitblit v1.8.0