Commit 17c53741 by zhengnw@sobot.com

net base code 支持code 和retcode

parent a3d47ff9
package com.sobot.network.apiUtils; package com.sobot.network.apiUtils;
public class SobotBaseCode<T> { import java.io.Serializable;
private String code; public class SobotBaseCode<T> implements Serializable {
private String retCode;
private T data; private T data;
private String retMsg;
private String code;
private String msg; private String msg;
public String getMsg() { public String getRetCode() {
return msg; return retCode;
} }
public void setMsg(String msg) { public void setRetCode(String retCode) {
this.msg = msg; this.retCode = retCode;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public String getRetMsg() {
return retMsg;
}
public void setRetMsg(String retMsg) {
this.retMsg = retMsg;
} }
public String getCode() { public String getCode() {
...@@ -22,11 +42,11 @@ public class SobotBaseCode<T> { ...@@ -22,11 +42,11 @@ public class SobotBaseCode<T> {
this.code = code; this.code = code;
} }
public T getData() { public String getMsg() {
return data; return msg;
} }
public void setData(T data) { public void setMsg(String msg) {
this.data = data; this.msg = msg;
} }
} }
\ No newline at end of file
package com.sobot.network.apiUtils;
public interface SobotNetConstant {
String RESULT_SUCCESS_CODE = "000000";
String RESULT_SUCCESS_CODE_SECOND = "1";
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment