|
@@ -9,9 +9,7 @@ import com.qmth.themis.business.entity.TEStudent;
|
|
import com.qmth.themis.business.enums.MqEnum;
|
|
import com.qmth.themis.business.enums.MqEnum;
|
|
import com.qmth.themis.business.enums.RoleEnum;
|
|
import com.qmth.themis.business.enums.RoleEnum;
|
|
import com.qmth.themis.business.enums.SystemOperationEnum;
|
|
import com.qmth.themis.business.enums.SystemOperationEnum;
|
|
-import com.qmth.themis.business.service.EhcacheService;
|
|
|
|
-import com.qmth.themis.business.service.TEConfigService;
|
|
|
|
-import com.qmth.themis.business.service.TEStudentService;
|
|
|
|
|
|
+import com.qmth.themis.business.service.*;
|
|
import com.qmth.themis.business.util.EhcacheUtil;
|
|
import com.qmth.themis.business.util.EhcacheUtil;
|
|
import com.qmth.themis.business.util.JacksonUtil;
|
|
import com.qmth.themis.business.util.JacksonUtil;
|
|
import com.qmth.themis.business.util.RedisUtil;
|
|
import com.qmth.themis.business.util.RedisUtil;
|
|
@@ -39,10 +37,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.security.NoSuchAlgorithmException;
|
|
import java.security.NoSuchAlgorithmException;
|
|
-import java.util.Date;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.Objects;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Description: 考生 前端控制器
|
|
* @Description: 考生 前端控制器
|
|
@@ -74,6 +69,12 @@ public class TEStudentController {
|
|
@Resource
|
|
@Resource
|
|
TEConfigService teConfigService;
|
|
TEConfigService teConfigService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ TEExamService teExamService;
|
|
|
|
+
|
|
|
|
+ @Resource
|
|
|
|
+ TOeExamRecordService tOeExamRecordService;
|
|
|
|
+
|
|
@ApiOperation(value = "学生登录接口")
|
|
@ApiOperation(value = "学生登录接口")
|
|
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
|
@ApiResponses({@ApiResponse(code = 200, message = "学生信息", response = TEStudent.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "学生信息", response = TEStudent.class)})
|
|
@@ -138,11 +139,17 @@ public class TEStudentController {
|
|
//mq发送消息end
|
|
//mq发送消息end
|
|
//测试
|
|
//测试
|
|
String test = SignatureInfo.build(SignatureType.TOKEN, sessionId, token);
|
|
String test = SignatureInfo.build(SignatureType.TOKEN, sessionId, token);
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
//获取未完/待考列表
|
|
//获取未完/待考列表
|
|
-
|
|
|
|
|
|
+ Map unFinishExam = tOeExamRecordService.getUnFinishExam(teStudent.getId());
|
|
|
|
+ if (Objects.isNull(unFinishExam)) {
|
|
|
|
+ List<Map> list = teExamService.getWaitingExam(teStudent.getId());
|
|
|
|
+ map.put("waiting", list);
|
|
|
|
+ } else {
|
|
|
|
+ map.put("unFinished", unFinishExam);
|
|
|
|
+ }
|
|
//获取全局考试配置
|
|
//获取全局考试配置
|
|
TEConfig teConfig = teConfigService.getGlobalConfig();
|
|
TEConfig teConfig = teConfigService.getGlobalConfig();
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
|
// map.put(SystemConstant.ACCESS_TOKEN, token);
|
|
// map.put(SystemConstant.ACCESS_TOKEN, token);
|
|
map.put(SystemConstant.GLOBAL, teConfig);
|
|
map.put(SystemConstant.GLOBAL, teConfig);
|
|
map.put(SystemConstant.ACCESS_TOKEN, test);
|
|
map.put(SystemConstant.ACCESS_TOKEN, test);
|