|
@@ -6,6 +6,8 @@ import com.cnd3b.common.data.Row;
|
|
|
import com.cnd3b.common.data.Rows;
|
|
|
import com.cnd3b.common.data.RowsMap;
|
|
|
import com.cnd3b.common.data.SQLFactory;
|
|
|
+import com.cnd3b.common.parameter.parameter;
|
|
|
+import com.cnd3b.utility.qywechat.base.Parameter;
|
|
|
|
|
|
|
|
|
public class live extends Controller {
|
|
@@ -58,13 +60,13 @@ public class live extends Controller {
|
|
|
resultObject.put("flivecount", flivecount);
|
|
|
//当前在线观众人数
|
|
|
resultObject.put("fcustcount", liverows.isEmpty() ? 0 : liverows.sum("fcustcount"));
|
|
|
- for (Row row : liverows) {
|
|
|
- //观看次数(次)
|
|
|
- String channelid = row.getString("channelid");
|
|
|
- //观看人数(人)
|
|
|
- long viewers = getCount("直播观看人数", "num", channelid);
|
|
|
- row.put("viewers", viewers);
|
|
|
- }
|
|
|
+// for (Row row : liverows) {
|
|
|
+// //观看次数(次)
|
|
|
+// String channelid = row.getString("channelid");
|
|
|
+// //观看人数(人)
|
|
|
+// long viewers = getCount("直播观看人数", "num", channelid);
|
|
|
+// row.put("viewers", viewers);
|
|
|
+// }
|
|
|
//直播列表
|
|
|
int pageSize = content.getIntValue("pageSize");
|
|
|
int pageNumber = content.getIntValue("pageNumber");
|
|
@@ -85,20 +87,23 @@ public class live extends Controller {
|
|
|
}
|
|
|
}
|
|
|
//限制在2022-03-17,2022-03-19
|
|
|
- Long time1 = getTimestamp("2022-03-17 19:30:00");
|
|
|
Long time2 = getTimestamp("2022-03-18 19:30:00");
|
|
|
Long time3 = getTimestamp("2022-03-19 19:30:00");
|
|
|
Long timeEnd = getTimestamp("2022-03-20 00:00:00");
|
|
|
Long timeNow = System.currentTimeMillis();
|
|
|
- System.err.println(time1);
|
|
|
- long hour = 3600000*2;
|
|
|
- System.err.println(time2+hour);
|
|
|
- if ((timeNow >= time1 && timeNow <= time1 + hour) || (timeNow >= time2 && timeNow <= time2 + hour) || (timeNow >= time3 && timeNow <= time3 + hour) || (timeNow >= timeEnd)) {
|
|
|
+ long hour = 3600000 * 2;
|
|
|
+ System.err.println(time2 + hour);
|
|
|
+ if (parameter.isdebug()) {
|
|
|
resultObject.put("tlivelist", newliverows);
|
|
|
} else {
|
|
|
- resultObject.put("tlivelist", new Rows());
|
|
|
+ if ((timeNow >= time2 && timeNow <= time2 + hour) || (timeNow >= time3 && timeNow <= time3 + hour) || (timeNow >= timeEnd)) {
|
|
|
+ resultObject.put("tlivelist", newliverows);
|
|
|
+ } else {
|
|
|
+ resultObject.put("tlivelist", new Rows());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
resultObject.put("pageSize", pageSize);
|
|
|
resultObject.put("pageNumber", pageNumber);
|
|
|
resultObject.put("total", flivecount);
|