Merge remote-tracking branch 'origin/master'

master
chentaisen 2024-08-22 16:42:51 +08:00
commit 2b5e843400
2 changed files with 14 additions and 13 deletions

View File

@ -61,11 +61,11 @@ public class Result<T> implements Serializable {
private T data;
public static <T> Result<T> success () {
return restResult(null, SUCCESS, null);
return restResult(null, SUCCESS, "操作成功");
}
public static <T> Result<T> success (T data) {
return restResult(data, SUCCESS, null);
return restResult(null, SUCCESS, "操作成功");
}
public static <T> Result<T> success (T data, String msg) {
@ -73,7 +73,7 @@ public class Result<T> implements Serializable {
}
public static <T> Result<T> error () {
return restResult(null, FAIL, null);
return restResult(null, FAIL, "操作失败");
}
public static <T> Result<T> error (String msg) {
@ -81,7 +81,7 @@ public class Result<T> implements Serializable {
}
public static <T> Result<T> error (T data) {
return restResult(data, FAIL, null);
return restResult(data, FAIL, "操作失败");
}
public static <T> Result<T> error (T data, String msg) {
@ -95,7 +95,7 @@ public class Result<T> implements Serializable {
public static <T> Result<T> warn () {
return restResult(null, WARN, null);
return restResult(null, FAIL, "警告");
}
public static <T> Result<T> warn (String msg) {
@ -103,7 +103,7 @@ public class Result<T> implements Serializable {
}
public static <T> Result<T> warn (T data) {
return restResult(data, WARN, null);
return restResult(data, FAIL, "警告");
}
public static <T> Result<T> warn (T data, String msg) {

View File

@ -18,6 +18,7 @@ import java.util.List;
* web
*
* @author muyu
*
*/
public class BaseController {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());