You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
783 B

package com.dsideal.gw.Bean;
import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class RetBean {
/**
* {
* "code": 200,
* "data": { },
* "msg": "成功"
* }
*/
private int code;
private String msg;
private JSONObject data;
public static final Integer SUCCESS = 200;
public static final Integer ERROR = 500;
public static final Integer OVERDUE = 401;
public static final Integer TIMEOUT = 30000;
public RetBean(int code, String msg, JSONObject data) {
this.code = code;
this.msg = msg;
this.data = data;
}
public String toJsonString() {
return JSONObject.toJSONString(this);
}
}