|
@@ -105,21 +105,18 @@ public class TIeInvigilateCallMobileController {
|
|
@Transactional
|
|
@Transactional
|
|
public Result callApply(@ApiJsonObject(name = "callApplyMobile", value = {
|
|
public Result callApply(@ApiJsonObject(name = "callApplyMobile", value = {
|
|
@ApiJsonProperty(key = "recordId", type = "long", example = "1", description = "考试记录id", required = true),
|
|
@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) {
|
|
}) @ApiParam(value = "监控信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
|
|
if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
}
|
|
}
|
|
Long recordId = Long.parseLong(String.valueOf(mapParameter.get("recordId")));
|
|
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;
|
|
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()))) {
|
|
if (Objects.isNull(source) || Objects.isNull(ExamRecordCacheUtil.getMonitorStatus(recordId, source.name()))) {
|
|
throw new BusinessException("推流状态为空");
|
|
throw new BusinessException("推流状态为空");
|
|
}
|
|
}
|
|
@@ -214,6 +211,7 @@ public class TIeInvigilateCallMobileController {
|
|
@Transactional
|
|
@Transactional
|
|
public Result callCancel(@ApiJsonObject(name = "callCancelExamMobile", value = {
|
|
public Result callCancel(@ApiJsonObject(name = "callCancelExamMobile", value = {
|
|
@ApiJsonProperty(key = "recordId", type = "long", example = "1", description = "考试记录id", required = true),
|
|
@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) {
|
|
}) @ApiParam(value = "监控信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
|
|
if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|