|
@@ -11,9 +11,11 @@ import com.google.common.collect.Lists;
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.commons.util.UrlUtil;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentCodeRepo;
|
|
|
+import cn.com.qmth.examcloud.core.basic.dao.StudentFaceRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentCodeEntity;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentEntity;
|
|
|
+import cn.com.qmth.examcloud.core.basic.dao.entity.StudentFaceEntity;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.StudentCacheBean;
|
|
|
import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
|
|
|
import cn.com.qmth.examcloud.web.cache.RandomObjectRedisCache;
|
|
@@ -28,6 +30,9 @@ public class StudentCache extends RandomObjectRedisCache<StudentCacheBean> {
|
|
|
@Autowired
|
|
|
StudentCodeRepo studentCodeRepo;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ StudentFaceRepo studentFaceRepo;
|
|
|
+
|
|
|
@Override
|
|
|
public StudentCacheBean loadFromResource(Object... keys) {
|
|
|
Long studentId = (Long) keys[0];
|
|
@@ -64,6 +69,13 @@ public class StudentCache extends RandomObjectRedisCache<StudentCacheBean> {
|
|
|
}
|
|
|
b.setStudentCodeList(studentCodeList);
|
|
|
|
|
|
+ StudentFaceEntity studentFaceEntity = GlobalHelper.getEntity(studentFaceRepo, studentId,
|
|
|
+ StudentFaceEntity.class);
|
|
|
+
|
|
|
+ if (null != studentFaceEntity) {
|
|
|
+ b.setFaceToken(studentFaceEntity.getFaceToken());
|
|
|
+ }
|
|
|
+
|
|
|
return b;
|
|
|
}
|
|
|
|
|
@@ -74,8 +86,8 @@ public class StudentCache extends RandomObjectRedisCache<StudentCacheBean> {
|
|
|
|
|
|
@Override
|
|
|
protected int getTimeout() {
|
|
|
- // 5分钟
|
|
|
- return 60 * 5;
|
|
|
+ // 10分钟
|
|
|
+ return 60 * 10;
|
|
|
}
|
|
|
|
|
|
}
|