|
@@ -100,12 +100,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);
|
|
@@ -212,7 +212,7 @@ public class TEStudentController {
|
|
|
}
|
|
|
//添加用户会话缓存
|
|
|
String sessionId = SessionUtil
|
|
|
- .digest(teStudent.getIdentity(), Math.abs(authDto.getRoleCodes().toString().hashCode()), source);
|
|
|
+ .digest(teStudent.getId(), Math.abs(authDto.getRoleCodes().toString().hashCode()), source);
|
|
|
|
|
|
ExpireTimeDTO expireTime = SystemConstant.getExpireTime(source, platform);
|
|
|
TBSession tbSession = new TBSession(sessionId, String.valueOf(teStudent.getId()),
|
|
@@ -285,7 +285,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();
|
|
@@ -298,7 +298,7 @@ public class TEStudentController {
|
|
|
boolean delete = true;
|
|
|
for (Source s : Source.values()) {
|
|
|
String sessionId = SessionUtil
|
|
|
- .digest(teStudent.getIdentity(), Math.abs(authDto.getRoleCodes().toString().hashCode()), s.name());
|
|
|
+ .digest(teStudent.getId(), Math.abs(authDto.getRoleCodes().toString().hashCode()), s.name());
|
|
|
if (Objects.nonNull(redisUtil.getUserSession(sessionId))) {
|
|
|
delete = false;
|
|
|
break;
|
|
@@ -328,7 +328,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());
|
|
|
TEExamActivityDto teExamActivityDto = new TEExamActivityDto(ec, examActivityCacheBean, examStudentCacheBean,
|