From 829f629756e5402bcd3e9f6ef1f9c6dbffbabb11 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Wed, 17 Apr 2024 14:46:29 +0800
Subject: [PATCH] 55测试环境

---
 src/main/java/com/xcong/excoin/common/response/Result.java |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/common/response/Result.java b/src/main/java/com/xcong/excoin/common/response/Result.java
index f47e154..8af9687 100644
--- a/src/main/java/com/xcong/excoin/common/response/Result.java
+++ b/src/main/java/com/xcong/excoin/common/response/Result.java
@@ -1,5 +1,6 @@
 package com.xcong.excoin.common.response;
 
+import com.xcong.excoin.utils.MessageSourceUtils;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -18,11 +19,13 @@
 
     private static final int SUCCESS = 0;
 
-    private static final String SUCCESS_MSG = "success";
+    private static final String SUCCESS_MSG = MessageSourceUtils.getString("result_success_msg");
 
     private static final int FAIL = -1;
 
     private static final int LOGIN_FAIL = -2;
+    
+    private static final int LOADING = -4;
 
     @ApiModelProperty(value = "状态码", example = "0")
     private int code;
@@ -47,6 +50,7 @@
         result.data = data;
         return result;
     }
+
     public static Result ok(Object data) {
         Result result = new Result();
         result.code = SUCCESS;
@@ -68,4 +72,18 @@
         result.msg = msg;
         return result;
     }
+
+    public static Result timeOut(String msg) {
+        Result result = new Result();
+        result.code = -3;
+        result.msg = msg;
+        return result;
+    }
+    
+    public static Result loading(String msg) {
+        Result result = new Result();
+        result.code = LOADING;
+        result.msg = msg;
+        return result;
+    }
 }

--
Gitblit v1.9.1