Selaa lähdekoodia

直播频道查询新增按频道分类查询,
管理端新增商户默认按照认证商户进行
当前线上观众人数查询语句调整

沈静伟 4 vuotta sitten
vanhempi
commit
ae5e05ffdb

+ 5 - 0
src/dsb/com/cnd3b/restcontroller/customer/live/live.java

@@ -56,6 +56,11 @@ public class live extends Controller {
                 where.append("or t2.fagentname like'%").append(whereObject.getString("condition")).append("%' ");
                 where.append(")");
             }
+            if (whereObject.containsKey("categoryid") && !"".equals(whereObject.getString("categoryid"))) {
+                where.append(" and(");
+                where.append("t1.categoryid ='").append(whereObject.getString("categoryid")).append("' ");
+                where.append(")");
+            }
         }
 
         SQLFactory costhead = new SQLFactory(this, "Ö±²¥Áбí²éѯ", pageSize, pageNumber, sort);

+ 5 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/live/live.java

@@ -61,6 +61,11 @@ public class live extends Controller {
                 where.append("or t2.fagentname like'%").append(whereObject.getString("condition")).append("%' ");
                 where.append(")");
             }
+            if (whereObject.containsKey("categoryid") && !"".equals(whereObject.getString("categoryid"))) {
+                where.append(" and(");
+                where.append("t1.categoryid ='").append(whereObject.getString("categoryid")).append("' ");
+                where.append(")");
+            }
         }
         SQLFactory costhead = new SQLFactory(this, "Ö±²¥Áбí²éѯ", pageSize, pageNumber, sort);
         costhead.addParameter("siteid", siteid);

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/tagents/tagents.java

@@ -237,7 +237,7 @@ public class tagents extends Controller {
                     tagents.setValue(key, value, 11L);
                 }
             }
-            if (ftype.equals("商户认证")) {
+            if (ftype.equals("商户认证") || ftype.equals("新增")) {
                 tagents.setValue("ftype", "普通商户", 11L);
             }
 

+ 7 - 6
src/dsb/com/cnd3b/restcontroller/publicmethod/live/SQL/当前线上观众人数查询.sql

@@ -1,6 +1,7 @@
-select sum(t1.count)as fcount from tlive_usercount t1
-inner join (
-                select t1.channelid, max(time) as time from tlive t1
-                inner join tlive_usercount t2 on t1.channelid = t2.channelid
-                where t1.livestatus = 'live'
-            ) t2 on t1.channelid = t2.channelid and t1.time = t2.time
+select channelid,tagentsid,t.fbrand,t.fprodclassname,count as fcount,t.channelcoverimageurl from (
+select ROW_NUMBER()over(partition by t1.channelid order by t1.time desc)as num,t1.channelid,t2.tagentsid,t1.count,t2.channelcoverimageurl,
+t3.fbrand,(stuff((select ',' + fprodclassname from tagents_prodclass where siteid = t3.siteid and tagentsid=t3.tagentsid for xml path('')),1,1,'')) as fprodclassname
+from tlive_usercount t1
+inner join tlive t2 on t1.channelid=t2.channelid --and t2.livestatus='live'
+inner join tagents t3 on t2.siteid=t3.siteid and t2.tagentsid=t3.tagentsid
+)t where t.num=1