wangliang 4 anni fa
parent
commit
194dee8cec

+ 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);
+    }
 }