瀏覽代碼

实时观众列表返回数据更新

吴志根 4 年之前
父節點
當前提交
27d18de3ee
共有 1 個文件被更改,包括 17 次插入5 次删除
  1. 17 5
      src/dsb/com/cnd3b/restcontroller/customer/live/SQL/实时观众列表.sql

+ 17 - 5
src/dsb/com/cnd3b/restcontroller/customer/live/SQL/实时观众列表.sql

@@ -1,8 +1,20 @@
-SELECT t1.tlive_viewlogid,
-       t1.channelid,
-       CONVERT(varchar (100), DATEADD(S, convert(float, t1.createdtime) / 1000, '1970-01-01 08:00'), 120) as createdtime,
-       t1.param1 AS viewerid,
-       t1.param2 AS viewername
+SELECT t1.PARAM2                                                AS name,
+       t1.PARAM1                                                AS userid,
+       t1.playduration,
+       CONVERT(varchar (100), DATEADD(S, convert(float, t1.createdtime) / 1000, '1970-01-01 08:00'), 120) as datetime,
+       t1.province,
+       t1.city,
+       t1.ipaddress,
+       t1.useragent,
+       t1.ismobile,
+       t1.browser,
+       (
+           SELECT liveuv
+                      AS num
+           FROM tlive_sessiondata AS t2
+           WHERE t1.sessionid = t2.sessionid
+       )                                                        AS viewcount,
+       t1.param3                                                AS viewtype
 FROM tlive_viewlog AS t1
 WHERE t1.createdtime = $createdtime$
   AND t1.channelid = $channelid$