|
@@ -109,12 +109,12 @@ public class TEStudentController {
|
|
|
|
|
|
@ApiOperation(value = "学生登录接口")
|
|
|
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
|
|
- @ApiResponses({ @ApiResponse(code = 200, message = "学生信息", response = TEExamResultDto.class) })
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "学生信息", response = TEExamResultDto.class)})
|
|
|
public Result login(
|
|
|
- @ApiJsonObject(name = "loginStudent", value = { @ApiJsonProperty(key = "identity", description = "证件号"),
|
|
|
+ @ApiJsonObject(name = "loginStudent", value = {@ApiJsonProperty(key = "identity", description = "证件号"),
|
|
|
@ApiJsonProperty(key = "password", description = "密码"),
|
|
|
@ApiJsonProperty(key = "orgId", type = "long", example = "1", description = "机构id"),
|
|
|
- @ApiJsonProperty(key = "examId", type = "long", example = "1", description = "批次id") }) @ApiParam(value = "学生信息", required = true) @RequestBody Map<String, Object> mapParameter)
|
|
|
+ @ApiJsonProperty(key = "examId", type = "long", example = "1", description = "批次id")}) @ApiParam(value = "学生信息", required = true) @RequestBody Map<String, Object> mapParameter)
|
|
|
throws NoSuchAlgorithmException {
|
|
|
if (Objects.isNull(mapParameter)) {
|
|
|
throw new BusinessException(ExceptionResultEnum.STUDENT_IS_NULL);
|
|
@@ -172,8 +172,7 @@ public class TEStudentController {
|
|
|
redisUtil.waitLock(lockKey, SystemConstant.REDIS_LOCK_STUDENT_TIME_OUT);
|
|
|
try {
|
|
|
//判断是否有正在考试的记录
|
|
|
- TEStudentCacheDto teStudentCacheDto = ExamingDataCacheUtil.getStudentExaming(user.getId());
|
|
|
- Long examingRecordId = teStudentCacheDto != null ? teStudentCacheDto.getExamingRecordId() : null;
|
|
|
+ Long examingRecordId = ExamingDataCacheUtil.getExamingRecordId(user.getId());
|
|
|
if (Objects.nonNull(examingRecordId)) {
|
|
|
WebsocketStatusEnum sta = ExamRecordCacheUtil.getClientWebsocketStatus(examingRecordId);
|
|
|
//有正在考试的记录,且考生端websocket在线则不允许登陆
|
|
@@ -290,7 +289,7 @@ public class TEStudentController {
|
|
|
|
|
|
@ApiOperation(value = "登出接口")
|
|
|
@RequestMapping(value = "/logout", method = RequestMethod.POST)
|
|
|
- @ApiResponses({ @ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class) })
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
|
public Result logout() throws NoSuchAlgorithmException {
|
|
|
TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
|
|
|
TBSession tbSession = (TBSession) ServletUtil.getRequestSession();
|
|
@@ -333,7 +332,7 @@ public class TEStudentController {
|
|
|
* @return
|
|
|
*/
|
|
|
private ExamUnFinishBean unFinishCommon(Long recordId, ExamCacheBean ec, ExamStudentCacheBean examStudentCacheBean,
|
|
|
- ExamActivityCacheBean examActivityCacheBean, Long examStudentId) {
|
|
|
+ ExamActivityCacheBean examActivityCacheBean, Long examStudentId) {
|
|
|
ExamCourseCacheBean examCourseCacheBean = teExamCourseService
|
|
|
.getExamCourseCacheBean(ec.getId(), examStudentCacheBean.getCourseCode());
|
|
|
TEExamActivityWaitDto teExamActivityWaitDto = new TEExamActivityWaitDto(ec, examActivityCacheBean,
|