版本更新
This commit is contained in:
parent
b6b635d7d8
commit
78c12e1fd8
@ -46,13 +46,13 @@ public class JsonResult<E> implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
public static <T> JsonResult<T> success(T data) {
|
||||
return new JsonResult<>(Code.SUCCESS, Message.SUCCESS, data);
|
||||
public static JsonResult<Object> success (Object data) {
|
||||
return new JsonResult<>(Code.SUCCESS, Message.SUCCESS,data);
|
||||
}
|
||||
public static JsonResult<Object> success (String msg) {
|
||||
return new JsonResult<>(Code.SUCCESS, msg,null);
|
||||
}
|
||||
public static <T> JsonResult<T> success (String msg,T data) {
|
||||
public static JsonResult<Object> success (String msg,Object data) {
|
||||
return new JsonResult<>(Code.SUCCESS, msg, data);
|
||||
}
|
||||
|
||||
@ -71,4 +71,12 @@ public class JsonResult<E> implements Serializable {
|
||||
public static JsonResult<Object> failed(String msg, Object data) {
|
||||
return new JsonResult<>(Code.FAILED, msg, data);
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return this.code == Code.SUCCESS;
|
||||
}
|
||||
|
||||
public boolean isFailed() {
|
||||
return this.code != Code.SUCCESS;
|
||||
}
|
||||
}
|
||||
2
pom.xml
2
pom.xml
@ -28,7 +28,7 @@
|
||||
<jackson.version>2.18.0</jackson.version>
|
||||
<hutool.version>5.8.26</hutool.version>
|
||||
<org.projectlombok.version>1.18.30</org.projectlombok.version>
|
||||
<mybatis-flex.version>1.10.8</mybatis-flex.version>
|
||||
<mybatis-flex.version>1.11.1</mybatis-flex.version>
|
||||
<mybatis.version>3.0.4</mybatis.version>
|
||||
<satoken.version>1.40.0</satoken.version>
|
||||
<mysql.version>8.0.32</mysql.version>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user