From c7828b072288110cf0dae2b63e9d1081e184b7f4 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期一, 26 一月 2026 11:54:25 +0800
Subject: [PATCH] 设备管理-设备保养,时间搜索记录sql语句
---
src/main/java/com/ruoyi/framework/web/domain/R.java | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/framework/web/domain/R.java b/src/main/java/com/ruoyi/framework/web/domain/R.java
index d16cc72..bd4f69f 100644
--- a/src/main/java/com/ruoyi/framework/web/domain/R.java
+++ b/src/main/java/com/ruoyi/framework/web/domain/R.java
@@ -1,6 +1,7 @@
package com.ruoyi.framework.web.domain;
import java.io.Serializable;
+import com.ruoyi.common.constant.HttpStatus;
/**
* 鍝嶅簲淇℃伅涓讳綋
@@ -12,10 +13,10 @@
private static final long serialVersionUID = 1L;
/** 鎴愬姛 */
- public static final int SUCCESS = 0;
+ public static final int SUCCESS = HttpStatus.SUCCESS;
/** 澶辫触 */
- public static final int FAIL = 500;
+ public static final int FAIL = HttpStatus.ERROR;
private int code;
@@ -101,4 +102,14 @@
{
this.data = data;
}
+
+ public static <T> Boolean isError(R<T> ret)
+ {
+ return !isSuccess(ret);
+ }
+
+ public static <T> Boolean isSuccess(R<T> ret)
+ {
+ return R.SUCCESS == ret.getCode();
+ }
}
--
Gitblit v1.9.3