wangliang 4 سال پیش
والد
کامیت
194dee8cec
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      themis-exam/src/main/java/com/qmth/themis/exam/util/ServletUtil.java

+ 9 - 0
themis-exam/src/main/java/com/qmth/themis/exam/util/ServletUtil.java

@@ -225,4 +225,13 @@ public class ServletUtil {
         ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
         return servletRequestAttributes.getResponse();
     }
+
+    /**
+     * 获取请求的student account
+     *
+     * @return
+     */
+    public static Object getRequestStudentAccount() {
+        return getRequest().getAttribute(SystemConstant.STUDENT_ACCOUNT);
+    }
 }