|
@@ -18,13 +18,12 @@ import cn.com.qmth.examcloud.core.oe.student.api.ExamRecordDataCloudService;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.api.request.GetExamRecordDataIdsReq;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.api.request.UpdateExamRecordDataBatchNumReq;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.api.response.GetExamRecordDataIdsResp;
|
|
|
+import cn.com.qmth.examcloud.core.oe.task.service.ExamRecordDataService;
|
|
|
import cn.com.qmth.examcloud.support.examing.ExamRecordData;
|
|
|
-import cn.com.qmth.examcloud.support.redis.RedisKeyHelper;
|
|
|
-import cn.com.qmth.examcloud.web.redis.RedisClient;
|
|
|
|
|
|
/**
|
|
|
* @Description 获取待处理数据
|
|
|
- * @Author lideyin
|
|
|
+ * @Author xt
|
|
|
* @Date 2019/12/17 16:39
|
|
|
* @Version 1.0
|
|
|
*/
|
|
@@ -45,7 +44,7 @@ public class DataGainExamExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
private ExamRecordDataCloudService examRecordDataCloudService;
|
|
|
|
|
|
@Autowired
|
|
|
- private RedisClient redisClient;
|
|
|
+ private ExamRecordDataService examRecordDataService;
|
|
|
|
|
|
@Override
|
|
|
public List<KeyValuePair<Long, ExamRecordData>> execute(Long key, ExamRecordData examRecordData,
|
|
@@ -73,7 +72,7 @@ public class DataGainExamExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
}
|
|
|
for (Long id : ids) {
|
|
|
// 根据id获取考试信息缓存
|
|
|
- ExamRecordData erd = getExamRecordDataCache(id);
|
|
|
+ ExamRecordData erd = examRecordDataService.getExamRecordDataCache(id);
|
|
|
if (erd == null) {
|
|
|
throw new StatusException("1001", "获取Redis中考试信息为空");
|
|
|
}
|
|
@@ -98,8 +97,4 @@ public class DataGainExamExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
return resultList;
|
|
|
}
|
|
|
|
|
|
- private ExamRecordData getExamRecordDataCache(Long examRecordDataId) {
|
|
|
- String key = RedisKeyHelper.getBuilder().examRecordDataKey(examRecordDataId);
|
|
|
- return redisClient.get(key + examRecordDataId, ExamRecordData.class);
|
|
|
- }
|
|
|
}
|