Bladeren bron

监考端接口

wangliang 4 jaren geleden
bovenliggende
commit
a26e6b7db6

+ 12 - 0
themis-business/src/main/resources/db/init.sql

@@ -470,6 +470,12 @@ INSERT INTO `t_b_privilege` VALUES (96, '监考考试批次列表', '/api/admin/
 INSERT INTO `t_b_privilege` VALUES (97, '监考考试属性统计', '/api/admin/exam/prop/count', 'LINK', NULL, 5, NULL, '2020-08-01 12:08:31');
 INSERT INTO `t_b_privilege` VALUES (98, '试卷查询', '/api/admin/exam/paper/query', 'LINK', 7, 4, NULL, '2020-08-01 12:08:31');
 INSERT INTO `t_b_privilege` VALUES (99, '科目修改', '/api/admin/exam/course/save', 'LINK', 7, 5, NULL, '2020-08-01 12:08:31');
+INSERT INTO `t_b_privilege` VALUES (100, '实时监控台列表', '/api/admin/invigilate/list', 'LINK', NULL, 1, NULL, '2020-08-01 12:08:31');
+INSERT INTO `t_b_privilege` VALUES (101, '实时监控台视频列表', '/api/admin/invigilate/list/video', 'LINK', NULL, 2, NULL, '2020-08-01 12:08:31');
+INSERT INTO `t_b_privilege` VALUES (102, '移动端监控观看地址更新', '/api/mobile/monitor/live_url', 'LINK', 60, 28, NULL, '2020-08-01 12:08:31');
+INSERT INTO `t_b_privilege` VALUES (103, '移动端监控状态更新', '/api/mobile/monitor/status', 'LINK', 60, 29, NULL, '2020-08-01 12:08:31');
+INSERT INTO `t_b_privilege` VALUES (104, '移动端发送通话申请', '/api/mobile/monitor/call/apply', 'LINK', 60, 30, NULL, '2020-08-01 12:08:31');
+INSERT INTO `t_b_privilege` VALUES (105, '移动端撤销通话申请', '/api/mobile/monitor/call/cancel', 'LINK', 60, 31, NULL, '2020-08-01 12:08:31');
 COMMIT;
 
 -- ----------------------------
@@ -600,6 +606,12 @@ INSERT INTO `t_b_role_privilege` VALUES (87, 'INVIGILATE', 96);
 INSERT INTO `t_b_role_privilege` VALUES (88, 'INVIGILATE', 97);
 INSERT INTO `t_b_role_privilege` VALUES (89, 'ADMIN', 98);
 INSERT INTO `t_b_role_privilege` VALUES (90, 'ADMIN', 99);
+INSERT INTO `t_b_role_privilege` VALUES (91, 'INVIGILATE', 100);
+INSERT INTO `t_b_role_privilege` VALUES (92, 'INVIGILATE', 101);
+INSERT INTO `t_b_role_privilege` VALUES (93, 'STUDENT', 100);
+INSERT INTO `t_b_role_privilege` VALUES (94, 'STUDENT', 101);
+INSERT INTO `t_b_role_privilege` VALUES (95, 'STUDENT', 102);
+INSERT INTO `t_b_role_privilege` VALUES (96, 'STUDENT', 103);
 COMMIT;
 
 -- ----------------------------

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

@@ -73,11 +73,11 @@ public class TIeInvigilateCallMobileController {
                 throw new BusinessException("观看地址不能为空");
             }
             String liveUrl = String.valueOf(mapParameter.get("liveUrl"));
-            TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl);
+            TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, MonitorStatusSourceEnum.INIT);
             //获取考试记录缓存
             Map<String, Object> objectMap = redisUtil.getHashEntries(RedisKeyHelper.examRecordCacheKey(recordId));
             objectMap.put(SystemConstant.MONITOR_LIVE_URL_ + source.name(), liveUrl);
-//            objectMap.put(SystemConstant.MONITOR_STATUS_ + source.name(), null);
+            objectMap.put(SystemConstant.MONITOR_STATUS_ + source.name(), tIeExamInvigilateCallLog.getStatus().name());
             redisUtil.setForHash(RedisKeyHelper.examRecordCacheKey(recordId), objectMap);
 
             //监考监控通话信息 发送mq start

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

@@ -71,11 +71,11 @@ public class TIeInvigilateCallOeController {
                 throw new BusinessException("观看地址不能为空");
             }
             String liveUrl = String.valueOf(mapParameter.get("liveUrl"));
-            TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl);
+            TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, source, liveUrl, MonitorStatusSourceEnum.INIT);
             //获取考试记录缓存
             Map<String, Object> objectMap = redisUtil.getHashEntries(RedisKeyHelper.examRecordCacheKey(recordId));
             objectMap.put(SystemConstant.MONITOR_LIVE_URL_ + source.name(), liveUrl);
-//            objectMap.put(SystemConstant.MONITOR_STATUS_ + source.name(), tIeExamInvigilateCallLog.getStatus().name());
+            objectMap.put(SystemConstant.MONITOR_STATUS_ + source.name(), tIeExamInvigilateCallLog.getStatus().name());
             redisUtil.setForHash(RedisKeyHelper.examRecordCacheKey(recordId), objectMap);
 
             //监考监控通话信息 发送mq start

+ 1 - 1
themis-exam/src/main/resources/application.properties

@@ -153,5 +153,5 @@ prefix.url.mobile=api/mobile
 wxapp.upload.url=http://wxapp2.qmth.com.cn
 
 #\u65E0\u9700\u9274\u6743\u7684url
-no.auth.urls=/webjars/**,/druid/**,/swagger-ui.html,/doc.html,/swagger-resources/**,/v2/api-docs,/webjars/springfox-swagger-ui/**,/api/oe/student/login,/api/oe/sys/env,/file/**,/upload/**,/client/**,/base_photo/**,/frontend/**,/api/oe/exam/short_code,/api/oe/monitor/live_url,/api/oe/monitor/call/apply,/api/oe/monitor/call/cancel,/api/mobile/monitor/live_url,/api/mobile/monitor/call/apply,/api/mobile/monitor/call/cancel,/api/mobile/authorization
+no.auth.urls=/webjars/**,/druid/**,/swagger-ui.html,/doc.html,/swagger-resources/**,/v2/api-docs,/webjars/springfox-swagger-ui/**,/api/oe/student/login,/api/oe/sys/env,/file/**,/upload/**,/client/**,/base_photo/**,/frontend/**,/api/oe/exam/short_code,/api/mobile/authorization
 common.system.urls=/api/oe/student/logout,/api/oe/exam/file/upload,/api/mobile/file/upload