|
@@ -17,6 +17,10 @@ public class R<T> implements Serializable
|
|
|
|
|
|
/** 失败 */
|
|
|
public static final int FAIL = Constants.FAIL;
|
|
|
+ /**
|
|
|
+ * 登录状态失效
|
|
|
+ */
|
|
|
+ public static final Integer LOGIN_EXPIRE = Constants.LOGIN_EXPIRE;
|
|
|
|
|
|
private int code;
|
|
|
|
|
@@ -49,6 +53,11 @@ public class R<T> implements Serializable
|
|
|
return restResult(null, FAIL, msg);
|
|
|
}
|
|
|
|
|
|
+ public static <T> R<T> loginExpire(String msg)
|
|
|
+ {
|
|
|
+ return restResult(null, LOGIN_EXPIRE, msg);
|
|
|
+ }
|
|
|
+
|
|
|
public static <T> R<T> fail(T data)
|
|
|
{
|
|
|
return restResult(data, FAIL, null);
|