|
@@ -103,8 +103,8 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
@Resource
|
|
|
TSyncExamStudentScoreService tSyncExamStudentScoreService;
|
|
|
|
|
|
- @Resource
|
|
|
- TOeExamRecordService tOeExamRecordService;
|
|
|
+// @Resource
|
|
|
+// TOeExamRecordService tOeExamRecordService;
|
|
|
|
|
|
@Transactional
|
|
|
@Override
|
|
@@ -516,7 +516,6 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
* @param id
|
|
|
*/
|
|
|
@Override
|
|
|
- @Transactional
|
|
|
public void updateWarningCount(Long id) {
|
|
|
this.baseMapper.updateWarningCount(id);
|
|
|
}
|
|
@@ -552,7 +551,8 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
} else {
|
|
|
ExamRecordCacheUtil.setWarningUnread(id, 1, timestamp);
|
|
|
}
|
|
|
- this.sendExamRecordDataUpdateWarningCountMq(id, System.currentTimeMillis());
|
|
|
+// this.sendExamRecordDataUpdateWarningCountMq(id, timestamp);
|
|
|
+ this.sendExamRecordDataSaveMq(id, timestamp);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -562,18 +562,18 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
* @param number
|
|
|
*/
|
|
|
@Override
|
|
|
- @Transactional
|
|
|
public void updateWarningUnreadCache(Long id, Integer number) {
|
|
|
long timestamp = System.currentTimeMillis();
|
|
|
Integer warningUnread = ExamRecordCacheUtil.getWarningUnread(id);
|
|
|
- if (Objects.nonNull(warningUnread) && warningUnread.intValue() == 0) {
|
|
|
+ if (Objects.nonNull(warningUnread) && number.intValue() == 0) {
|
|
|
ExamRecordCacheUtil.setWarningUnread(id, number, timestamp);
|
|
|
- } else if (Objects.nonNull(warningUnread) && warningUnread.intValue() > 0) {
|
|
|
+ } else if (Objects.nonNull(warningUnread) && number.intValue() > 0) {
|
|
|
ExamRecordCacheUtil.setWarningUnread(id, warningUnread - number, timestamp);
|
|
|
} else {
|
|
|
ExamRecordCacheUtil.setWarningUnread(id, 0, timestamp);
|
|
|
}
|
|
|
- this.sendExamRecordDataUpdateWarningUnreadMq(id, System.currentTimeMillis(), number);
|
|
|
+ this.sendExamRecordDataSaveMq(id, timestamp);
|
|
|
+// this.sendExamRecordDataUpdateWarningUnreadMq(id, timestamp, number);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -634,43 +634,43 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 发送mq更新考试预警数量记录
|
|
|
- *
|
|
|
- * @param recordId
|
|
|
- * @param timestamp
|
|
|
- */
|
|
|
- @Override
|
|
|
- public void sendExamRecordDataUpdateWarningCountMq(Long recordId, Long timestamp) {
|
|
|
- try {
|
|
|
- ExamRecordCacheUtil.setUpdateTime(recordId, timestamp);
|
|
|
- MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.EXAM_RECORD_UPDATE.name(), recordId.toString(), SystemConstant.WARNING_COUNT_UPDATE, timestamp);
|
|
|
- mqDtoService.assembleSendAsyncMsg(mqDto);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(SystemConstant.LOG_ERROR, e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 发送mq更新考试预警未读数量
|
|
|
- *
|
|
|
- * @param recordId
|
|
|
- * @param timestamp
|
|
|
- * @param number
|
|
|
- */
|
|
|
- @Override
|
|
|
- public void sendExamRecordDataUpdateWarningUnreadMq(Long recordId, Long timestamp, Integer number) {
|
|
|
- try {
|
|
|
- ExamRecordCacheUtil.setUpdateTime(recordId, timestamp);
|
|
|
- Map<String, Object> properties = new HashMap<>();
|
|
|
- properties.put(SystemConstant.NUMBER, number);
|
|
|
- MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.EXAM_RECORD_UPDATE.name(), recordId.toString(), SystemConstant.WARNING_UNREAD_UPDATE, timestamp);
|
|
|
- mqDto.setProperties(properties);
|
|
|
- mqDtoService.assembleSendAsyncMsg(mqDto);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(SystemConstant.LOG_ERROR, e);
|
|
|
- }
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 发送mq更新考试预警数量记录
|
|
|
+// *
|
|
|
+// * @param recordId
|
|
|
+// * @param timestamp
|
|
|
+// */
|
|
|
+// @Override
|
|
|
+// public void sendExamRecordDataUpdateWarningCountMq(Long recordId, Long timestamp) {
|
|
|
+// try {
|
|
|
+// ExamRecordCacheUtil.setUpdateTime(recordId, timestamp);
|
|
|
+// MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.EXAM_RECORD_UPDATE.name(), recordId.toString(), SystemConstant.WARNING_COUNT_UPDATE, timestamp);
|
|
|
+// mqDtoService.assembleSendAsyncMsg(mqDto);
|
|
|
+// } catch (Exception e) {
|
|
|
+// log.error(SystemConstant.LOG_ERROR, e);
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 发送mq更新考试预警未读数量
|
|
|
+// *
|
|
|
+// * @param recordId
|
|
|
+// * @param timestamp
|
|
|
+// * @param number
|
|
|
+// */
|
|
|
+// @Override
|
|
|
+// public void sendExamRecordDataUpdateWarningUnreadMq(Long recordId, Long timestamp, Integer number) {
|
|
|
+// try {
|
|
|
+// ExamRecordCacheUtil.setUpdateTime(recordId, timestamp);
|
|
|
+// Map<String, Object> properties = new HashMap<>();
|
|
|
+// properties.put(SystemConstant.NUMBER, number);
|
|
|
+// MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.EXAM_RECORD_UPDATE.name(), recordId.toString(), SystemConstant.WARNING_UNREAD_UPDATE, timestamp);
|
|
|
+// mqDto.setProperties(properties);
|
|
|
+// mqDtoService.assembleSendAsyncMsg(mqDto);
|
|
|
+// } catch (Exception e) {
|
|
|
+// log.error(SystemConstant.LOG_ERROR, e);
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 发送mq更新考试记录
|