|
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import cn.com.qmth.examcloud.api.commons.security.bean.User;
|
|
|
+import cn.com.qmth.examcloud.api.commons.security.bean.UserType;
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentEntity;
|
|
@@ -24,6 +25,9 @@ import cn.com.qmth.examcloud.core.basic.service.SmsCodeService;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.StudentService;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.LoginInfo;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.cache.StudentCache;
|
|
|
+import cn.com.qmth.examcloud.reports.commons.bean.OnlineStudentReport;
|
|
|
+import cn.com.qmth.examcloud.reports.commons.bean.OnlineUserReport;
|
|
|
+import cn.com.qmth.examcloud.reports.commons.util.ReportsUtil;
|
|
|
import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
|
import cn.com.qmth.examcloud.web.redis.RedisClient;
|
|
|
import cn.com.qmth.examcloud.web.support.ApiId;
|
|
@@ -92,7 +96,15 @@ public class AuthController extends ControllerSupport {
|
|
|
}
|
|
|
|
|
|
User user = authService.login(loginInfo);
|
|
|
-
|
|
|
+ //在线数据打点 start
|
|
|
+ if(UserType.STUDENT.equals(user.getUserType())) {
|
|
|
+ //在线学生登录打点
|
|
|
+ ReportsUtil.report(new OnlineStudentReport(user.getRootOrgId(),user.getUserId()));
|
|
|
+ }else if(UserType.COMMON.equals(user.getUserType())) {
|
|
|
+ //在线用户登录打点
|
|
|
+ ReportsUtil.report(new OnlineUserReport(user.getRootOrgId(),user.getUserId()));
|
|
|
+ }
|
|
|
+ //在线数据打点 end
|
|
|
if (null != alwaysOK && alwaysOK) {
|
|
|
return new StatusResponseX<User>(user);
|
|
|
} else {
|