|
|
@@ -36,11 +36,11 @@ public class GetPolyvAnalysisBigData extends BaseClass implements Runnable {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取频道直播概览统计数据表
|
|
|
+ * 获取频道直播概览统计数据表,频道统计信息比较延迟,拉取昨天至今天的直播信息
|
|
|
*/
|
|
|
public void getLiveData() {
|
|
|
DBConnect dbConnect = new DBConnect();
|
|
|
- String[] channelids = dbConnect.runSqlQuery("select channelid from tlive where livestatus in('live','waiting') and convert(varchar(10),lastlivedate,120)=convert(varchar(10),getDate(),120) ").toArray("channelid");
|
|
|
+ String[] channelids = dbConnect.runSqlQuery("select channelid from tlive where DATEADD(Day,1, lastlivedate)>=convert(varchar(10),getDate(),120) ").toArray("channelid");
|
|
|
Polyv polyv = new Polyv();
|
|
|
ArrayList<String> sqllist = new ArrayList<>();
|
|
|
JSONArray dataArray = polyv.getChannelSummary(channelids, getDate_Str());
|
|
|
@@ -102,11 +102,11 @@ public class GetPolyvAnalysisBigData extends BaseClass implements Runnable {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取频道直播观看详情数据
|
|
|
+ * 获取频道直播观看详情数据,频道统计信息比较延迟,拉取昨天至今天的直播信息
|
|
|
*/
|
|
|
public void getLiveviewLog() {
|
|
|
DBConnect dbConnect = new DBConnect();
|
|
|
- String[] channelids = dbConnect.runSqlQuery("select channelid from tlive where livestatus in('live','waiting') and convert(varchar(10),lastlivedate,120)=convert(varchar(10),getDate(),120) ").toArray("channelid");
|
|
|
+ String[] channelids = dbConnect.runSqlQuery("select channelid from tlive where DATEADD(Day,1, lastlivedate)>=convert(varchar(10),getDate(),120)").toArray("channelid");
|
|
|
Polyv polyv = new Polyv();
|
|
|
for (String channelid : channelids) {
|
|
|
ArrayList<String> sqllist = new ArrayList<>();
|
|
|
@@ -187,7 +187,7 @@ public class GetPolyvAnalysisBigData extends BaseClass implements Runnable {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 获取频道直播观众聊天记录
|
|
|
+ * 获取频道直播观众聊天记录,信息获取延迟时间短,拉取当日该场次最新聊天记录时间之后的聊天信息
|
|
|
*/
|
|
|
public void getLiveMessageList() {
|
|
|
DBConnect dbConnect = new DBConnect();
|
|
|
@@ -273,11 +273,11 @@ public class GetPolyvAnalysisBigData extends BaseClass implements Runnable {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 查询频道多场次概览统计数据
|
|
|
+ * 查询频道多场次概览统计数据,场次统计信息比较延迟,拉取昨天至今天的直播场次信息
|
|
|
*/
|
|
|
public void getSessionStats() {
|
|
|
DBConnect dbConnect = new DBConnect();
|
|
|
- String[] channelids = dbConnect.runSqlQuery("select channelid from tlive where livestatus in('live','waiting') and convert(varchar(10),lastlivedate,120)=convert(varchar(10),getDate(),120) ").toArray("channelid");
|
|
|
+ String[] channelids = dbConnect.runSqlQuery("select channelid from tlive where DATEADD(Day,1, lastlivedate)>=convert(varchar(10),getDate(),120)").toArray("channelid");
|
|
|
for (String channelid : channelids) {
|
|
|
Polyv polyv = new Polyv();
|
|
|
ArrayList<String> sqllist = new ArrayList<>();
|