mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	update 优化 R 默认返回 msg
This commit is contained in:
		@@ -38,11 +38,11 @@ public class R<T> implements Serializable {
 | 
			
		||||
    private T data;
 | 
			
		||||
 | 
			
		||||
    public static <T> R<T> ok() {
 | 
			
		||||
        return restResult(null, SUCCESS, null);
 | 
			
		||||
        return restResult(null, SUCCESS, "操作成功");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static <T> R<T> ok(T data) {
 | 
			
		||||
        return restResult(data, SUCCESS, null);
 | 
			
		||||
        return restResult(data, SUCCESS, "操作成功");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static <T> R<T> ok(String msg) {
 | 
			
		||||
@@ -54,7 +54,7 @@ public class R<T> implements Serializable {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static <T> R<T> fail() {
 | 
			
		||||
        return restResult(null, FAIL, null);
 | 
			
		||||
        return restResult(null, FAIL, "操作失败");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static <T> R<T> fail(String msg) {
 | 
			
		||||
@@ -62,7 +62,7 @@ public class R<T> implements Serializable {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static <T> R<T> fail(T data) {
 | 
			
		||||
        return restResult(data, FAIL, null);
 | 
			
		||||
        return restResult(data, FAIL, "操作失败");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static <T> R<T> fail(String msg, T data) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user