wangliang před 4 roky
rodič
revize
69edcb10e7

+ 1 - 0
themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateCallMobileController.java

@@ -129,6 +129,7 @@ public class TIeInvigilateCallMobileController {
     @Transactional
     public Result callCancel(@ApiJsonObject(name = "callCancelBackendMobile", value = {
             @ApiJsonProperty(key = "recordId", type = "long", example = "1", description = "考试记录id", required = true),
+            @ApiJsonProperty(key = "source", description = "监考视频源", required = true)
     }) @ApiParam(value = "监控信息", required = true) @RequestBody Map<String, Object> mapParameter) {
         if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
             throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);

+ 6 - 8
themis-exam/src/main/java/com/qmth/themis/exam/api/TIeInvigilateCallMobileController.java

@@ -105,21 +105,18 @@ public class TIeInvigilateCallMobileController {
     @Transactional
     public Result callApply(@ApiJsonObject(name = "callApplyMobile", value = {
             @ApiJsonProperty(key = "recordId", type = "long", example = "1", description = "考试记录id", required = true),
+            @ApiJsonProperty(key = "source", description = "监考视频源", required = true)
     }) @ApiParam(value = "监控信息", required = true) @RequestBody Map<String, Object> mapParameter) {
         if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
             throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
         }
         Long recordId = Long.parseLong(String.valueOf(mapParameter.get("recordId")));
+        if (Objects.isNull(mapParameter.get("source")) || Objects.equals(mapParameter.get("source"), "")) {
+            throw new BusinessException("来源不能为空!");
+        }
+        MonitorVideoSourceEnum source = MonitorVideoSourceEnum.valueOf(String.valueOf(mapParameter.get("source")));
         //获取考试记录缓存
         String liveUrl = null;
-        MonitorVideoSourceEnum source = null;
-        if (Objects.nonNull(ExamRecordCacheUtil.getMonitorLiveUrlMobileFirst(recordId))) {
-            source = MonitorVideoSourceEnum.MOBILE_FIRST;
-            liveUrl = ExamRecordCacheUtil.getMonitorLiveUrlMobileFirst(recordId);
-        } else if (Objects.nonNull(ExamRecordCacheUtil.getMonitorLiveUrlMobileSecond(recordId))) {
-            source = MonitorVideoSourceEnum.MOBILE_SECOND;
-            liveUrl = ExamRecordCacheUtil.getMonitorLiveUrlMobileSecond(recordId);
-        }
         if (Objects.isNull(source) || Objects.isNull(ExamRecordCacheUtil.getMonitorStatus(recordId, source.name()))) {
             throw new BusinessException("推流状态为空");
         }
@@ -214,6 +211,7 @@ public class TIeInvigilateCallMobileController {
     @Transactional
     public Result callCancel(@ApiJsonObject(name = "callCancelExamMobile", value = {
             @ApiJsonProperty(key = "recordId", type = "long", example = "1", description = "考试记录id", required = true),
+            @ApiJsonProperty(key = "source", description = "监考视频源", required = true)
     }) @ApiParam(value = "监控信息", required = true) @RequestBody Map<String, Object> mapParameter) {
         if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
             throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);

+ 0 - 3
themis-exam/src/main/java/com/qmth/themis/exam/api/TIeInvigilateCallOeController.java

@@ -161,9 +161,6 @@ public class TIeInvigilateCallOeController {
         if (Objects.nonNull(ExamRecordCacheUtil.getMonitorLiveUrlClientCamera(recordId))) {
             source = MonitorVideoSourceEnum.CLIENT_CAMERA;
             liveUrl = ExamRecordCacheUtil.getMonitorLiveUrlClientCamera(recordId);
-        } else if (Objects.nonNull(ExamRecordCacheUtil.getMonitorLiveUrlClientScreen(recordId))) {
-            source = MonitorVideoSourceEnum.CLIENT_SCREEN;
-            liveUrl = ExamRecordCacheUtil.getMonitorLiveUrlClientScreen(recordId);
         }
         if (Objects.isNull(source) || Objects.isNull(ExamRecordCacheUtil.getMonitorStatus(recordId, source.name()))) {
             throw new BusinessException("推流状态为空");