Browse Source

开始录制添加cloudcode和schoolid

tags/正式3.10.0
雍文秀 1 year ago
parent
commit
a784748af0

+ 4
- 0
slive/src/main/java/com/xhkjedu/slive/mapper/recordserver/RecordserverMapper.java View File

@@ -2,6 +2,7 @@ package com.xhkjedu.slive.mapper.recordserver;
2 2
 
3 3
 import com.xhkjedu.base.TkMapper;
4 4
 import com.xhkjedu.slive.model.recordserver.LRecordserver;
5
+import com.xhkjedu.slive.vo.liveplay.RecordserverVo;
5 6
 import org.apache.ibatis.annotations.Param;
6 7
 
7 8
 import java.util.List;
@@ -31,4 +32,7 @@ public interface RecordserverMapper extends TkMapper<LRecordserver> {
31 32
 
32 33
     //根据课节id获取地址
33 34
     LRecordserver getRspathBySectionid(@Param("sectionid") Integer sectionid);
35
+
36
+    //根据教师id获取区域编码和学校id
37
+    RecordserverVo getCloudCodeAndSchoolIdByTid(@Param("tid") Integer tid);
34 38
 }

+ 3
- 0
slive/src/main/java/com/xhkjedu/slive/service/recordserver/RecordserverService.java View File

@@ -66,6 +66,9 @@ public class RecordserverService {
66 66
             server = recordserverMapper.getPath();
67 67
             if (server == null) return new ResultVo(1, "暂无可用录制服务");
68 68
         }
69
+        RecordserverVo recordserverVo = recordserverMapper.getCloudCodeAndSchoolIdByTid(rs.getTid());
70
+        rs.setCloudcode(recordserverVo.getCloudcode());
71
+        rs.setSchoolid(recordserverVo.getSchoolid());
69 72
         String rspath = server.getRspath();
70 73
         String param = JSON.toJSONString(rs);
71 74
         //服务是否可用

+ 2
- 0
slive/src/main/java/com/xhkjedu/slive/vo/liveplay/RecordserverVo.java View File

@@ -14,4 +14,6 @@ public class RecordserverVo {
14 14
     private Integer tid;//教师id
15 15
     private String sid;//sid
16 16
     private Integer sectionid;//课节id
17
+    private String cloudcode;//区域码
18
+    private Integer schoolid;//学校id
17 19
 }

+ 5
- 0
slive/src/main/resources/mapper/recordserver/RecordserverMapper.xml View File

@@ -54,4 +54,9 @@
54 54
         left join l_recordserver r on csp.rsid=r.rsid
55 55
         where r.rsstate=1 limit 1
56 56
     </select>
57
+    <!--根据教师id获取区域编码和学校id-->
58
+    <select id="getCloudCodeAndSchoolIdByTid" resultType="com.xhkjedu.slive.vo.liveplay.RecordserverVo">
59
+        select u.schoolid,(select cloudcode from t_cloud limit 1)cloudcode
60
+        from t_user u where u.userid=#{tid}
61
+    </select>
57 62
 </mapper>

Loading…
Cancel
Save