operator login interface

This commit is contained in:
Sola
2015-12-12 05:00:06 +08:00
parent a3ba3377db
commit 8a8281b973
10 changed files with 185 additions and 16 deletions

View File

@@ -0,0 +1,24 @@
package love.sola.netsupport.util;
import love.sola.netsupport.wechat.Command;
import javax.servlet.http.HttpSession;
/**
* ***********************************************
* Created by Sola on 2015/12/12.
* Don't modify this source without my agreement
* ***********************************************
*/
public class Checker {
public static boolean nonNull(Object... v) {
for (Object o : v) if (o == null) return false;
return true;
}
public static boolean authorized(HttpSession s, Command c) {
return s != null && s.getAttribute("authorized") == c;
}
}