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

@@ -4,6 +4,7 @@ import com.google.gson.Gson;
import love.sola.netsupport.pojo.Ticket;
import love.sola.netsupport.pojo.User;
import love.sola.netsupport.sql.SQLCore;
import love.sola.netsupport.util.Checker;
import love.sola.netsupport.util.ParseUtil;
import love.sola.netsupport.wechat.Command;
import org.hibernate.HibernateException;
@@ -54,7 +55,7 @@ public class TicketSubmit extends HttpServlet {
try (Session s = SQLCore.sf.openSession()) {
HttpSession httpSession = request.getSession(false);
if (httpSession == null || httpSession.getAttribute("authorized") != Command.SUBMIT) {
if (Checker.authorized(httpSession, Command.SUBMIT)) {
return new Response(Response.ResponseCode.UNAUTHORIZED);
}
User u = (User) httpSession.getAttribute("user");