|
@@ -515,49 +515,6 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
|
|
|
// 保存考试分数数据到分数获取队列
|
|
|
examScoreObtainQueueService.saveExamScoreObtainQueue(examRecordDataId);
|
|
|
-
|
|
|
- //清理考试缓存
|
|
|
- clearExamCache(examId);
|
|
|
-
|
|
|
- //设置并保存考试记录缓存中数据同步状态
|
|
|
- setAndSaveExamRecordDataSyncStatus(examRecordDataId);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 考试id
|
|
|
- *
|
|
|
- * @param examId
|
|
|
- */
|
|
|
- private void clearExamCache(Long examId) {
|
|
|
- ExamBoss examBoss = examBossService.getExamBoss(examId);
|
|
|
-
|
|
|
- if (null == examBoss) {
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- //考试完结次数加1
|
|
|
- examBoss.setEndCount(examBoss.getEndCount() + 1);
|
|
|
-
|
|
|
- //如果开考次数==考试完结次数,则删除考试基础信息缓存
|
|
|
- if (examBoss.getStartCount() == examBoss.getEndCount()) {
|
|
|
- examBossService.deleteExamBoss(examId);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 设置考试记录的同步状态
|
|
|
- *
|
|
|
- * @param examRecordDataId
|
|
|
- */
|
|
|
- private void setAndSaveExamRecordDataSyncStatus(Long examRecordDataId) {
|
|
|
- ExamRecordData examRecordData = examRecordDataCacheService.getExamRecordDataCache(examRecordDataId);
|
|
|
-
|
|
|
- if (SyncStatus.SYNCED == examRecordData.getSyncStatus()) {
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- examRecordData.setSyncStatus(SyncStatus.SYNCED);
|
|
|
- examRecordDataCacheService.saveExamRecordDataCache(examRecordDataId, examRecordData);
|
|
|
- }
|
|
|
}
|