|
@@ -415,7 +415,7 @@ public class Task {
|
|
|
for (Live openRewardLive : openRewardLives) {
|
|
for (Live openRewardLive : openRewardLives) {
|
|
|
String configJson = openRewardLive.getConfigJson();
|
|
String configJson = openRewardLive.getConfigJson();
|
|
|
LiveWatchConfig config = JSON.parseObject(configJson, LiveWatchConfig.class);
|
|
LiveWatchConfig config = JSON.parseObject(configJson, LiveWatchConfig.class);
|
|
|
- if (config.getEnabled()) {
|
|
|
|
|
|
|
+ if (config.getEnabled() && 1 == config.getParticipateCondition()) {
|
|
|
List<LiveWatchUser> liveWatchUsers = liveWatchUserService.checkOnlineNoRewardUser(openRewardLive.getLiveId(), now);
|
|
List<LiveWatchUser> liveWatchUsers = liveWatchUserService.checkOnlineNoRewardUser(openRewardLive.getLiveId(), now);
|
|
|
if (liveWatchUsers == null || liveWatchUsers.isEmpty()) {
|
|
if (liveWatchUsers == null || liveWatchUsers.isEmpty()) {
|
|
|
continue;
|
|
continue;
|
|
@@ -633,7 +633,7 @@ public class Task {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 定时扫描开启的直播间,检查是否到了打标签的时间
|
|
|
|
|
|
|
+ * 定时扫描开启的直播间,检查是否到了打标签的时间,然后把正在看直播的用户拆分为 直播用户和回放用户
|
|
|
* 每10秒执行一次
|
|
* 每10秒执行一次
|
|
|
*/
|
|
*/
|
|
|
@Scheduled(cron = "0/10 * * * * ?")
|
|
@Scheduled(cron = "0/10 * * * * ?")
|
|
@@ -896,6 +896,9 @@ public class Task {
|
|
|
List<LiveWatchLog> batch = updateLog.subList(i, end);
|
|
List<LiveWatchLog> batch = updateLog.subList(i, end);
|
|
|
liveWatchLogService.batchUpdateLiveWatchLog(batch);
|
|
liveWatchLogService.batchUpdateLiveWatchLog(batch);
|
|
|
}
|
|
}
|
|
|
|
|
+ for (LiveWatchLog liveWatchLog : updateLog) {
|
|
|
|
|
+ redisCache.setCacheObject("live:watch:log:cache:" + liveWatchLog.getLogId(), liveWatchLog, 1, TimeUnit.HOURS);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -923,7 +926,6 @@ public class Task {
|
|
|
// 查询 LiveWatchLog
|
|
// 查询 LiveWatchLog
|
|
|
LiveWatchLog queryLog = new LiveWatchLog();
|
|
LiveWatchLog queryLog = new LiveWatchLog();
|
|
|
queryLog.setLiveId(liveId);
|
|
queryLog.setLiveId(liveId);
|
|
|
- queryLog.setUserId(userId);
|
|
|
|
|
queryLog.setQwUserId(String.valueOf(qwUserId));
|
|
queryLog.setQwUserId(String.valueOf(qwUserId));
|
|
|
queryLog.setExternalContactId(exId);
|
|
queryLog.setExternalContactId(exId);
|
|
|
|
|
|