@Data
public class AjaxInfo {
public AjaxInfo(){
}
public AjaxInfo(Integer code,String msg){
this.code=code;
this.msg=msg;
}
private Integer code=0;
private String msg="操作成功";
private Object data;
public boolean isSuccess( ){
if(0 == code){
return true;
}else{
return false;
}
}
public static void main(String[] args) {
AjaxInfo ajaxInfo = new AjaxInfo();
ajaxInfo.setMsg("找不到页面");
if(ajaxInfo.isSuccess()){
}else{
System.out.println(JSON.toJSONString(ajaxInfo));
}
}
}