|
@@ -13,6 +13,7 @@ import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
|
import com.qmth.themis.common.util.Result;
|
|
|
import com.qmth.themis.common.util.ResultUtil;
|
|
|
+import com.qmth.themis.exam.config.DictionaryConfig;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -51,6 +52,10 @@ public class TIeInvigilateCallOeController {
|
|
|
@Resource
|
|
|
MqUtil mqUtil;
|
|
|
|
|
|
+ @Resource
|
|
|
+ DictionaryConfig dictionaryConfig;
|
|
|
+
|
|
|
+ @Deprecated
|
|
|
@ApiOperation(value = "监控观看地址更新接口")
|
|
|
@RequestMapping(value = "/live_url", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
@@ -75,7 +80,7 @@ public class TIeInvigilateCallOeController {
|
|
|
}
|
|
|
String liveUrl = String.valueOf(mapParameter.get("liveUrl"));
|
|
|
String monitorKey = ExamRecordCacheUtil.getMonitorKey(recordId);
|
|
|
- TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, MonitorStatusSourceEnum.INIT, monitorKey);
|
|
|
+ TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, MonitorStatusSourceEnum.INIT, monitorKey,null);
|
|
|
//获取考试记录缓存
|
|
|
ExamRecordCacheUtil.setMonitorLiveUrl(recordId, source, liveUrl, false);
|
|
|
ExamRecordCacheUtil.setMonitorStatus(recordId, source, tIeExamInvigilateCallLog.getStatus(), false);
|
|
@@ -133,7 +138,8 @@ public class TIeInvigilateCallOeController {
|
|
|
ExamRecordCacheUtil.setMonitorStatus(recordId, source, status, true);
|
|
|
ExamRecordCacheUtil.setMonitorCallStatus(recordId, source, callStatus);
|
|
|
String monitorKey = ExamRecordCacheUtil.getMonitorKey(recordId);
|
|
|
- TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, MonitorStatusSourceEnum.START, monitorKey, callStatus);
|
|
|
+ String streamName = dictionaryConfig.monitorDomain().getPrefix() + "_" + recordId + "_" + ExamRecordCacheUtil.getMonitorVideoSource(recordId);
|
|
|
+ TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, MonitorStatusSourceEnum.START, monitorKey, callStatus, streamName);
|
|
|
if (Objects.nonNull(mapParameter.get("type")) && !Objects.equals(mapParameter.get("type"), "")) {
|
|
|
tIeExamInvigilateCallLog.setType(ExceptionEnum.valueOf(String.valueOf(mapParameter.get("type"))));
|
|
|
}
|
|
@@ -175,7 +181,8 @@ public class TIeInvigilateCallOeController {
|
|
|
}
|
|
|
ExamRecordCacheUtil.setMonitorCallStatus(recordId, source, MonitorCallStatusSourceEnum.START);
|
|
|
String monitorKey = ExamRecordCacheUtil.getMonitorKey(recordId);
|
|
|
- TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, status, monitorKey, MonitorCallStatusSourceEnum.START);
|
|
|
+ String streamName = dictionaryConfig.monitorDomain().getPrefix() + "_" + recordId + "_" + ExamRecordCacheUtil.getMonitorVideoSource(recordId);
|
|
|
+ TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, status, monitorKey, MonitorCallStatusSourceEnum.START, streamName);
|
|
|
tIeExamInvigilateCallLog.setStartTime(System.currentTimeMillis());
|
|
|
//监考监控通话信息 发送mq start
|
|
|
MqDto mqDto = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.MONITOR_LOG.name(), tIeExamInvigilateCallLog, MqTagEnum.MONITOR_LOG, String.valueOf(tIeExamInvigilateCallLog.getId()), source.name());
|
|
@@ -211,7 +218,8 @@ public class TIeInvigilateCallOeController {
|
|
|
MonitorStatusSourceEnum status = ExamRecordCacheUtil.getMonitorStatus(recordId, source);
|
|
|
ExamRecordCacheUtil.setMonitorCallStatus(recordId, source, MonitorCallStatusSourceEnum.STOP);
|
|
|
String monitorKey = ExamRecordCacheUtil.getMonitorKey(recordId);
|
|
|
- TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, status, monitorKey, MonitorCallStatusSourceEnum.STOP);
|
|
|
+ String streamName = dictionaryConfig.monitorDomain().getPrefix() + "_" + recordId + "_" + ExamRecordCacheUtil.getMonitorVideoSource(recordId);
|
|
|
+ TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, status, monitorKey, MonitorCallStatusSourceEnum.STOP, streamName);
|
|
|
tIeExamInvigilateCallLog.setEndTime(System.currentTimeMillis());
|
|
|
//监考监控通话信息 发送mq start
|
|
|
MqDto mqDto = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.MONITOR_LOG.name(), tIeExamInvigilateCallLog, MqTagEnum.MONITOR_LOG, String.valueOf(tIeExamInvigilateCallLog.getId()), source.name());
|