|
|
@@ -375,10 +375,11 @@ public class live extends Controller {
|
|
|
*/
|
|
|
public String getRealTimeViewerList() {
|
|
|
String channelid = content.getString("channelid");
|
|
|
- Long createdtime = getDateTime().getTime() / 1000;
|
|
|
+ Long lastmodified = getDateTime().getTime() / 1000- 5* 60;
|
|
|
+ System.err.println(lastmodified);
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "实时观众列表", pageSize, pageNumber, "t1.tlive_viewlogid DESC");
|
|
|
sqlFactory.addParameter("channelid", channelid);
|
|
|
- sqlFactory.addParameter("createdtime", createdtime * 1000);
|
|
|
+ sqlFactory.addParameter("lastmodified", lastmodified * 1000);
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
|
|
|
return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
|
|
|
}
|
|
|
@@ -417,6 +418,17 @@ public class live extends Controller {
|
|
|
sqlFactory.addParameter_in("tagentsidList", tagentsidList);
|
|
|
Rows agentRows = dbConnect.runSqlQuery(sqlFactory.getSQL());
|
|
|
|
|
|
+ for(Row row:agentRows){
|
|
|
+ //观看次数(次)
|
|
|
+ String channelid = row.getString("channelid");
|
|
|
+ //观看人数(人)
|
|
|
+ long viewers = getCount("观看人数", "num", channelid);
|
|
|
+ row.put("viewers", viewers);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return getSucReturnObject().setData(agentRows).toString();
|
|
|
}
|
|
|
|