|
|
@@ -1004,16 +1004,16 @@ public class LiveServiceImpl implements ILiveService
|
|
|
}
|
|
|
|
|
|
// 如果视频时长大于0,将直播间信息存入Redis
|
|
|
- if (videoDuration > 0 && live.getStartTime() != null) {
|
|
|
+ if (videoDuration > 0 && exist.getStartTime() != null) {
|
|
|
Map<String, Object> tagMarkInfo = new HashMap<>();
|
|
|
- tagMarkInfo.put("liveId", live.getLiveId());
|
|
|
- tagMarkInfo.put("startTime", live.getStartTime().atZone(java.time.ZoneId.systemDefault()).toInstant().toEpochMilli());
|
|
|
+ tagMarkInfo.put("liveId", exist.getLiveId());
|
|
|
+ tagMarkInfo.put("startTime", exist.getStartTime().atZone(java.time.ZoneId.systemDefault()).toInstant().toEpochMilli());
|
|
|
tagMarkInfo.put("videoDuration", videoDuration);
|
|
|
|
|
|
- String tagMarkKey = String.format(LiveKeysConstant.LIVE_TAG_MARK_CACHE, live.getLiveId());
|
|
|
+ String tagMarkKey = String.format(LiveKeysConstant.LIVE_TAG_MARK_CACHE, exist.getLiveId());
|
|
|
redisCache.setCacheObject(tagMarkKey, JSON.toJSONString(tagMarkInfo), 24, TimeUnit.HOURS);
|
|
|
log.info("手动开直播间开启,已加入打标签缓存: liveId={}, startTime={}, videoDuration={}",
|
|
|
- live.getLiveId(), live.getStartTime(), videoDuration);
|
|
|
+ exist.getLiveId(), exist.getStartTime(), videoDuration);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("手动开写入直播间打标签缓存失败: liveId={}, error={}", live.getLiveId(), e.getMessage(), e);
|