update 优化 R 默认返回 msg

master
疯狂的狮子li 4 years ago
parent 075f7fc19e
commit 3517a8f494

@ -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) {

Loading…
Cancel
Save