Browse Source

修复BUG

wangliang 2 năm trước cách đây
mục cha
commit
c8d06f590b

+ 10 - 5
themis-admin/src/main/resources/application-main-temp.properties

@@ -141,11 +141,16 @@ prefix.url.admin=api/admin
 prefix.url.open=api/open
 prefix.url.notify=api/notify
 
-
 #\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/admin/user/login/account,/api/admin/sys/org/queryByOrgCode,/file/**,/upload/**,/client/**,/base_photo/**,/frontend/**,/api/admin/client/save,/api/admin/client/upload,/api/admin/client/query,/api/admin/app/save,/api/admin/app/query,/api/notify/monitor/record/tencent
-
+no.auth.urls=/webjars/**,/druid/**,/swagger-ui.html,/doc.html,/swagger-resources/**,/v2/api-docs,/webjars/springfox-swagger-ui/**,/api/admin/user/login/account,/api/admin/sys/org/queryByOrgCode,/file/**,/upload/**,/client/**,/base_photo/**,/frontend/**,/api/admin/client/save,/api/admin/client/upload,/api/admin/client/query,/api/admin/app/save,/api/admin/app/query,/api/notify/monitor/record/tencent,/api/notify/monitor/status/tencent
 common.system.urls=/api/admin/sys/getMenu,/api/admin/user/logout,/api/admin/sys/env,/api/admin/sys/file/upload,/api/admin/sys/file/download,/api/admin/sys/org/query,/api/admin/sys/role/query,/api/admin/sys/examActivity/query,/api/admin/sys/exam/query,/api/admin/sys/examRoom/query,/api/admin/sys/exam/privilegeQuery,/api/admin/student/photo/upload,/api/admin/sys/getPlayUrls,/api/admin/sys/exam/finish/query,/api/admin/sys/get_tencent_video
 
-cloud.mark.url=https://epcc.markingcloud.com/admin/home
-cloud.mark.studentScoreApi=/api/exam/student/score
+cloud.mark.url=https://192.168.10.224:80
+cloud.mark.studentScoreApi=/api/exam/student/score
+cloud.mark.examSaveApi=/api/exam/save
+cloud.mark.subjectSaveApi=/api/exam/subject/save
+cloud.mark.studentSaveApi=/api/exam/student/save
+cloud.mark.fileUploadApi=/api/file/{type}/upload
+
+com.qmth.solar.access-key=8134f6aae0134770b8618913705d3667
+com.qmth.solar.access-secret=s1NENpvc8Jq5evcE0B7GfLmoQOvwmlCy

+ 22 - 0
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEStudentExamRecordDto.java

@@ -61,6 +61,28 @@ public class TEStudentExamRecordDto implements Serializable {
     @ApiModelProperty(name = "开启转录的视频源")
     private String monitorRecord;
 
+    @ApiModelProperty(name = "视频分段视频源")
+    private String videoSource;
+
+    @ApiModelProperty(name = "非分段视频源")
+    private String tencentVideoUrl;
+
+    public String getVideoSource() {
+        return videoSource;
+    }
+
+    public void setVideoSource(String videoSource) {
+        this.videoSource = videoSource;
+    }
+
+    public String getTencentVideoUrl() {
+        return tencentVideoUrl;
+    }
+
+    public void setTencentVideoUrl(String tencentVideoUrl) {
+        this.tencentVideoUrl = tencentVideoUrl;
+    }
+
     public String getMonitorRecord() {
         return monitorRecord;
     }

+ 25 - 5
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEStudentServiceImpl.java

@@ -7,16 +7,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.reflect.TypeToken;
+import com.google.gson.Gson;
 import com.qmth.themis.business.bean.StudentParams;
 import com.qmth.themis.business.bean.admin.StudentPhotoUploadResponseBean;
 import com.qmth.themis.business.cache.bean.ExamCacheBean;
 import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.dao.TEStudentMapper;
-import com.qmth.themis.business.dto.response.TEStudentDto;
-import com.qmth.themis.business.dto.response.TEStudentExamRecordDto;
-import com.qmth.themis.business.dto.response.TEStudentExamRecordVideoDto;
-import com.qmth.themis.business.dto.response.TEStudentExamRecordVideoMessageDto;
+import com.qmth.themis.business.dto.response.*;
 import com.qmth.themis.business.entity.TBUser;
 import com.qmth.themis.business.entity.TEExamStudentLog;
 import com.qmth.themis.business.entity.TEStudent;
@@ -93,7 +92,28 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
      */
     @Override
     public IPage<TEStudentExamRecordDto> studentExamRecordQuery(IPage<Map> iPage, Long studentId, Long examId) {
-        return teStudentMapper.studentExamRecordQuery(iPage, studentId, examId);
+        teStudentMapper.studentExamRecordQuery(iPage, studentId, examId);
+        IPage<TEStudentExamRecordDto> teStudentExamRecordDtoIPage = teStudentMapper.studentExamRecordQuery(iPage, studentId, examId);
+        for (TEStudentExamRecordDto t : teStudentExamRecordDtoIPage.getRecords()) {
+            if (Objects.nonNull(t.getTencentVideoUrl()) && !Objects.equals(t.getTencentVideoUrl().trim(), "")) {
+                Gson gson = new Gson();
+                List<TEStudentMonitorRecordDto> monitorRecordList = gson.fromJson(t.getTencentVideoUrl(), new TypeToken<List<TEStudentMonitorRecordDto>>() {
+                }.getType());
+                StringJoiner stringJoiner = new StringJoiner("");
+                for (TEStudentMonitorRecordDto teStudentMonitorRecordDto : monitorRecordList) {
+                    stringJoiner.add(SystemConstant.getMonitorRecordVideoSource(teStudentMonitorRecordDto.getVideoSource()).name().toUpperCase()).add(",");
+                }
+                t.setMonitorRecord(stringJoiner.toString().substring(0, stringJoiner.toString().length() - 1));
+            } else if (Objects.nonNull(t.getVideoSource()) && !Objects.equals(t.getVideoSource().trim(), "")) {
+                String[] strs = t.getVideoSource().split(",");
+                StringJoiner stringJoiner = new StringJoiner("");
+                for (String s : strs) {
+                    stringJoiner.add(SystemConstant.getMonitorRecordVideoSource(s).name().toUpperCase()).add(",");
+                }
+                t.setMonitorRecord(stringJoiner.toString().substring(0, stringJoiner.toString().length() - 1));
+            }
+        }
+        return teStudentExamRecordDtoIPage;
     }
 
     @Transactional

+ 3 - 1
themis-business/src/main/resources/mapper/TEStudentMapper.xml

@@ -67,7 +67,9 @@
             t_m_tencent_video_message t
             where
             t.exam_record_id = toer.id)) as videoCount,
-            toer.monitor_record as monitorRecord
+            toer.monitor_record as monitorRecord,
+            (select GROUP_CONCAT(t.video_source) from t_m_tencent_video_message t where t.exam_record_id = toer.id) as videoSource,
+            toer.tencent_video_url as tencentVideoUrl
         from
             t_e_exam_student tees
         join t_e_exam tee on

+ 4 - 2
themis-exam/src/main/resources/application-main-temp.properties

@@ -139,7 +139,9 @@ spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/MET
 prefix.url.exam=api/oe
 prefix.url.mobile=api/mobile
 
-
 #\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/mobile/authorization
-common.system.urls=/api/oe/student/logout,/api/oe/exam/file/upload,/api/mobile/file/upload
+common.system.urls=/api/oe/student/logout,/api/oe/exam/file/upload,/api/mobile/file/upload
+
+com.qmth.solar.access-key=8134f6aae0134770b8618913705d3667
+com.qmth.solar.access-secret=s1NENpvc8Jq5evcE0B7GfLmoQOvwmlCy

+ 6 - 2
themis-task/src/main/resources/application-main-temp.properties

@@ -170,5 +170,9 @@ mq.config.map.WEBSOCKET_OE_MOBILE_GROUP=themis-group-exam-websocketOeMobile
 mq.config.map.TENCENT_VIDEO_GROUP=themis-group-exam-tencentVideo
 
 #\u4E91\u9605\u5377\u540C\u6B65\u914D\u7F6E
-cloud.mark.url=https://epcc.markingcloud.com/admin/home
-cloud.mark.studentScoreApi=/api/exam/student/score
+cloud.mark.url=https://192.168.10.224:80
+cloud.mark.studentScoreApi=/api/exam/student/score
+cloud.mark.examSaveApi=/api/exam/save
+cloud.mark.subjectSaveApi=/api/exam/subject/save
+cloud.mark.studentSaveApi=/api/exam/student/save
+cloud.mark.fileUploadApi=/api/file/{type}/upload