Commit 4c36475b2ee0a7f6317855b1697677b05cac51ab

Authored by xp.Huang
1 parent ffaf4d54

fix: 获取视频列表时,返回流媒体协议

@@ -97,8 +97,8 @@ public class TkVideoController extends BaseController { @@ -97,8 +97,8 @@ public class TkVideoController extends BaseController {
97 @PathVariable("protocolType") ProtocolType protocolType) 97 @PathVariable("protocolType") ProtocolType protocolType)
98 throws ThingsboardException { 98 throws ThingsboardException {
99 if (!protocolType.equals(ProtocolType.RTSP) 99 if (!protocolType.equals(ProtocolType.RTSP)
100 - || !protocolType.equals(ProtocolType.RTMP)  
101 - || !protocolType.equals(ProtocolType.HLS)) { 100 + && !protocolType.equals(ProtocolType.RTMP)
  101 + && !protocolType.equals(ProtocolType.HLS)) {
102 protocolType = ProtocolType.HLS; 102 protocolType = ProtocolType.HLS;
103 } 103 }
104 return getCameraURL(entityId, protocolType); 104 return getCameraURL(entityId, protocolType);
@@ -115,7 +115,7 @@ public class TkVideoController extends BaseController { @@ -115,7 +115,7 @@ public class TkVideoController extends BaseController {
115 115
116 private ResponseResult<Map<String, String>> getCameraURL( 116 private ResponseResult<Map<String, String>> getCameraURL(
117 String entityId, ProtocolType protocolType) throws ThingsboardException { 117 String entityId, ProtocolType protocolType) throws ThingsboardException {
118 - if (protocolType == null) { 118 + if (protocolType == null) {
119 protocolType = ProtocolType.HLS; 119 protocolType = ProtocolType.HLS;
120 } 120 }
121 String url = 121 String url =
@@ -29,6 +29,8 @@ @@ -29,6 +29,8 @@
29 <result property="appKey" column="app_key"/> 29 <result property="appKey" column="app_key"/>
30 <result property="appSecret" column="app_secret"/> 30 <result property="appSecret" column="app_secret"/>
31 <result property="ssl" column="ssl"/> 31 <result property="ssl" column="ssl"/>
  32 + <result property="protocolType" column="protocol_type" typeHandler="org.apache.ibatis.type.EnumTypeHandler"/>
  33 + <result property="remark" column="remark"/>
32 </association> 34 </association>
33 </resultMap> 35 </resultMap>
34 36
@@ -42,7 +44,7 @@ @@ -42,7 +44,7 @@
42 44
43 <sql id="detailColumns"> 45 <sql id="detailColumns">
44 <include refid="basicColumns"/> 46 <include refid="basicColumns"/>
45 - ,org.name AS organization_name,ivp.host,ivp.app_key,ivp.app_secret,ivp.ssl 47 + ,org.name AS organization_name,ivp.host,ivp.app_key,ivp.app_secret,ivp.ssl,ivp.remark,ivp.protocol_type
46 </sql> 48 </sql>
47 <select id="getVideoPage" resultMap="videoMap"> 49 <select id="getVideoPage" resultMap="videoMap">
48 SELECT 50 SELECT