|
@@ -184,7 +184,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
Check.isNull(examStudentId, "examStudentId不能为空");
|
|
Check.isNull(examStudentId, "examStudentId不能为空");
|
|
Check.isNull(userId, "userId不能为空");
|
|
Check.isNull(userId, "userId不能为空");
|
|
|
|
|
|
- String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + userId;
|
|
|
|
|
|
+ String sequenceLockKey = CacheConstants.LOCK_EXAM_CONTROL + userId;
|
|
// 开始考试上锁,分布式锁,系统在请求结束后会,自动释放锁,无需手动解锁
|
|
// 开始考试上锁,分布式锁,系统在请求结束后会,自动释放锁,无需手动解锁
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
|
|
|
|
@@ -342,7 +342,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
Check.isNull(examRecordDataId, "examRecordDataId不能为空");
|
|
Check.isNull(examRecordDataId, "examRecordDataId不能为空");
|
|
Check.isNull(userId, "userId不能为空");
|
|
Check.isNull(userId, "userId不能为空");
|
|
|
|
|
|
- String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + userId;
|
|
|
|
|
|
+ String sequenceLockKey = CacheConstants.LOCK_EXAM_CONTROL + userId;
|
|
// 开始考试上锁,分布式锁,系统在请求结束后会,自动释放锁,无需手动解锁
|
|
// 开始考试上锁,分布式锁,系统在请求结束后会,自动释放锁,无需手动解锁
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
|
|
|
|
@@ -779,7 +779,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void manualEndExam(Long studentId, String ip, Boolean force) {
|
|
public void manualEndExam(Long studentId, String ip, Boolean force) {
|
|
- String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + studentId;
|
|
|
|
|
|
+ String sequenceLockKey = CacheConstants.LOCK_EXAM_CONTROL + studentId;
|
|
//系统在请求结束后会,自动释放锁,无需手动解锁
|
|
//系统在请求结束后会,自动释放锁,无需手动解锁
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
|
|
|
|
@@ -801,7 +801,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
@Override
|
|
@Override
|
|
public void handInExam(Long examRecordDataId, HandInExamType handInExamType, String ip, Boolean force) {
|
|
public void handInExam(Long examRecordDataId, HandInExamType handInExamType, String ip, Boolean force) {
|
|
// 此锁是为了避免自动交卷服务与断点续考交卷或活检失败交卷,同一时刻交卷争抢资源导致死锁
|
|
// 此锁是为了避免自动交卷服务与断点续考交卷或活检失败交卷,同一时刻交卷争抢资源导致死锁
|
|
- String sequenceLockKey = Constants.HAND_IN_EXAM_LOCK_PREFIX + examRecordDataId;
|
|
|
|
|
|
+ String sequenceLockKey = CacheConstants.LOCK_HAND_IN_EXAM + examRecordDataId;
|
|
// 系统在请求结束后会,自动释放锁,无需手动解锁
|
|
// 系统在请求结束后会,自动释放锁,无需手动解锁
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
|
|
|
|
@@ -1644,7 +1644,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ExamProcessResultInfo checkExamInProgress2(Long studentId, String ip) {
|
|
public ExamProcessResultInfo checkExamInProgress2(Long studentId, String ip) {
|
|
- String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + studentId;
|
|
|
|
|
|
+ String sequenceLockKey = CacheConstants.LOCK_EXAM_CONTROL + studentId;
|
|
// 系统在请求结束后会,自动释放锁,无需手动解锁
|
|
// 系统在请求结束后会,自动释放锁,无需手动解锁
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
SequenceLockHelper.getLock(sequenceLockKey);
|
|
|
|
|