|
@@ -68,24 +68,7 @@ public class ExamProcessController extends ControllerSupport {
|
|
|
@PostMapping("/checkExamInProgress")
|
|
|
public ExamProcessResultInfo checkExamInProgress() {
|
|
|
User user = getAccessUser();
|
|
|
- String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + user.getUserId();
|
|
|
- // 系统在请求结束后会,自动释放锁,无需手动解锁
|
|
|
- SequenceLockHelper.getLock(sequenceLockKey);
|
|
|
- ExamProcessResultInfo res = new ExamProcessResultInfo();
|
|
|
- try {
|
|
|
- CheckExamInProgressInfo info = examControlService.checkExamInProgress(user.getUserId(), getIp(getRequest()));
|
|
|
- res.setCode(Constants.COMMON_SUCCESS_CODE);
|
|
|
- res.setData(info);
|
|
|
- return res;
|
|
|
- } catch (StatusException e) {
|
|
|
- if (e.getCode().equals(Constants.EXAM_RECORD_NOT_END_STATUS_CODE)) {
|
|
|
- res.setCode(Constants.PROCESSING_EXAM_RECORD_CODE);
|
|
|
- return res;
|
|
|
- }
|
|
|
- throw e;
|
|
|
- } catch (Exception e) {
|
|
|
- throw e;
|
|
|
- }
|
|
|
+ return examControlService.checkExamInProgress2(user.getUserId(), getIp(getRequest()));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "考试心跳")
|