From afb2bc8e77e086ebeb358915e12fad41dac78a6a Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期四, 23 十月 2025 14:41:34 +0800
Subject: [PATCH] 1020更新
---
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java
index 0003b19..1bc91ba 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java
@@ -14,9 +14,25 @@
/** 成功 */
public static final int SUCCESS = Constants.SUCCESS;
+ public static final int VIPERROR = Constants.VIP_ERROR;
/** 失败 */
public static final int FAIL = Constants.FAIL;
+ public static final int FAILUPDATE = Constants.FAILUPDATE;
+ /** 积分商城兑换失败 */
+ public static final int EXCHANGECODE = Constants.EXCHANGECODE;
+ /**
+ * 账号被冻结
+ */
+ public static final int FREEZE = Constants.FREEZE;
+ /**
+ * 短信验证码无效
+ */
+ public static final int ERRORCODE = Constants.ERRORCODE;
+ /**
+ * 登陆失效
+ */
+ public static final int TOKEN_ERROR = Constants.TOKEN_ERROR;
private int code;
@@ -33,6 +49,14 @@
{
return restResult(data, SUCCESS, null);
}
+ public static <T> R<T> vipError(String msg)
+ {
+ return restResult(null, VIPERROR, msg);
+ }
+ public static <T> R<T> failUpdate(String msg)
+ {
+ return restResult(null, FAILUPDATE, msg);
+ }
public static <T> R<T> ok(T data, String msg)
{
@@ -43,12 +67,39 @@
{
return restResult(null, FAIL, null);
}
+ public static <T> R<T> tokenError(String msg)
+ {
+ return restResult(null, TOKEN_ERROR, msg);
+ }
public static <T> R<T> fail(String msg)
{
return restResult(null, FAIL, msg);
}
+ /**
+ * 商城兑换失败code
+ * @param msg
+ * @return
+ * @param <T>
+ */
+ public static <T> R<T> exchangeError(String msg)
+ {
+ return restResult(null, EXCHANGECODE, msg);
+ }
+ public static <T> R<T> freeze(String msg)
+ {
+ return restResult(null, FREEZE, msg);
+ }
+ public static <T> R<T> errorCode(String msg)
+ {
+ return restResult(null, ERRORCODE, msg);
+ }
+ public static <T> R<T> errCode(String msg)
+ {
+ return restResult(null, FREEZE, msg);
+ }
+
public static <T> R<T> fail(T data)
{
return restResult(data, FAIL, null);
--
Gitblit v1.7.1