org.sdn.api.response.OpenResponse Maven / Gradle / Ivy
package org.sdn.api.response;
import org.sdn.api.utils.StringUtils;
import java.io.Serializable;
/**
* API基础响应信息
* @author gaosong
* @date 2018/10/15.
*/
public abstract class OpenResponse implements Serializable {
private static final long serialVersionUID = 5014379068811962022L;
private String code;
private String msg;
private String subCode;
public String getSubCode() {
return subCode;
}
public void setSubCode(String subCode) {
this.subCode = subCode;
}
private String body;
/**
* 废弃方法,请使用getCode替换
*
* @return
*/
@Deprecated
public String getErrorCode() {
return this.getCode();
}
/**
* 废弃方法,请使用setCode替换
*
* @param errorCode
*/
@Deprecated
public void setErrorCode(String errorCode) {
this.setCode(errorCode);
}
/**
* Getter method for property code.
*
* @return property value of code
*/
public String getCode() {
return code;
}
/**
* Setter method for property code.
*
* @param code value to be assigned to property code
*/
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public boolean isSuccess() {
return StringUtils.isEmpty(subCode);
}
}