From dc31792dc1b8ad1658e49ba8fce9a1be924e6fbb Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期四, 30 十一月 2023 08:44:04 +0800
Subject: [PATCH] 理片笼测试修改

---
 springboot-vue3/src/main/java/com/example/springboot/entity/vo/Result.java |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/vo/Result.java b/springboot-vue3/src/main/java/com/example/springboot/entity/vo/Result.java
new file mode 100644
index 0000000..60af4a4
--- /dev/null
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/vo/Result.java
@@ -0,0 +1,40 @@
+package com.example.springboot.entity.vo;
+
+import lombok.Data;
+
+@Data
+public class Result {
+    private Integer code;
+    private String msg;
+    private Object data;
+
+
+
+
+    public static Result success(Object data) {
+        Result result = new Result();
+        result.setCode(1);
+        result.setMsg("鎴愬姛");
+        result.setData(data);
+        return result;
+    }
+
+    public static Result success() {
+        return success(null);
+    }
+
+    public static Result fail(String msg) {
+        Result result = new Result();
+        result.setCode(0);
+        result.setMsg(msg);
+        return result;
+    }
+
+    public static Result fail(Integer code, String msg, Object object) {
+        Result result = new Result();
+        result.setCode(0);
+        result.setMsg(msg);
+        result.setData(object);
+        return result;
+    }
+}
\ No newline at end of file

--
Gitblit v1.8.0