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
 
2
 
3
 import com.xhkjedu.base.TkMapper;
3
 import com.xhkjedu.base.TkMapper;
4
 import com.xhkjedu.slive.model.recordserver.LRecordserver;
4
 import com.xhkjedu.slive.model.recordserver.LRecordserver;
5
+import com.xhkjedu.slive.vo.liveplay.RecordserverVo;
5
 import org.apache.ibatis.annotations.Param;
6
 import org.apache.ibatis.annotations.Param;
6
 
7
 
7
 import java.util.List;
8
 import java.util.List;
31
 
32
 
32
     //根据课节id获取地址
33
     //根据课节id获取地址
33
     LRecordserver getRspathBySectionid(@Param("sectionid") Integer sectionid);
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
             server = recordserverMapper.getPath();
66
             server = recordserverMapper.getPath();
67
             if (server == null) return new ResultVo(1, "暂无可用录制服务");
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
         String rspath = server.getRspath();
72
         String rspath = server.getRspath();
70
         String param = JSON.toJSONString(rs);
73
         String param = JSON.toJSONString(rs);
71
         //服务是否可用
74
         //服务是否可用

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

14
     private Integer tid;//教师id
14
     private Integer tid;//教师id
15
     private String sid;//sid
15
     private String sid;//sid
16
     private Integer sectionid;//课节id
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
         left join l_recordserver r on csp.rsid=r.rsid
54
         left join l_recordserver r on csp.rsid=r.rsid
55
         where r.rsstate=1 limit 1
55
         where r.rsstate=1 limit 1
56
     </select>
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
 </mapper>
62
 </mapper>

Loading…
Cancel
Save