Commit 4c36475b2ee0a7f6317855b1697677b05cac51ab

Authored by xp.Huang
1 parent ffaf4d54

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

... ... @@ -97,8 +97,8 @@ public class TkVideoController extends BaseController {
97 97 @PathVariable("protocolType") ProtocolType protocolType)
98 98 throws ThingsboardException {
99 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 102 protocolType = ProtocolType.HLS;
103 103 }
104 104 return getCameraURL(entityId, protocolType);
... ... @@ -115,7 +115,7 @@ public class TkVideoController extends BaseController {
115 115
116 116 private ResponseResult<Map<String, String>> getCameraURL(
117 117 String entityId, ProtocolType protocolType) throws ThingsboardException {
118   - if (protocolType == null) {
  118 + if (protocolType == null) {
119 119 protocolType = ProtocolType.HLS;
120 120 }
121 121 String url =
... ...
... ... @@ -29,6 +29,8 @@
29 29 <result property="appKey" column="app_key"/>
30 30 <result property="appSecret" column="app_secret"/>
31 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 34 </association>
33 35 </resultMap>
34 36
... ... @@ -42,7 +44,7 @@
42 44
43 45 <sql id="detailColumns">
44 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 48 </sql>
47 49 <select id="getVideoPage" resultMap="videoMap">
48 50 SELECT
... ...