Browse Source

Update AjaxResponse.java

master
许孟阳 3 years ago
parent
commit
e384c3dddf
  1. 23
      src/main/java/vip/xumy/core/pojo/com/AjaxResponse.java

23
src/main/java/vip/xumy/core/pojo/com/AjaxResponse.java

@ -2,9 +2,8 @@ package vip.xumy.core.pojo.com;
import lombok.Data; import lombok.Data;
/** All rights reserved /**
* author:mengyxu * All rights reserved author:mengyxu date:2019年6月26日
* date:2019年6月26日
*/ */
@Data @Data
@ -17,7 +16,7 @@ public class AjaxResponse {
this.success = success; this.success = success;
this.message = message; this.message = message;
} }
public AjaxResponse() { public AjaxResponse() {
super(); super();
} }
@ -27,5 +26,21 @@ public class AjaxResponse {
this.message = message; this.message = message;
this.data = data; this.data = data;
} }
public static AjaxResponse successed(String msg) {
return new AjaxResponse(true, msg);
}
public static AjaxResponse failed(String msg) {
return new AjaxResponse(false, msg);
}
public static AjaxResponse successed() {
return new AjaxResponse(true, "操作成功");
}
public static AjaxResponse failed() {
return new AjaxResponse(false, "操作失败");
}
} }

Loading…
Cancel
Save