|
@@ -1006,7 +1006,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
}
|
|
|
|
|
|
// 从Redis中获取观看时长
|
|
|
- String redisKey = "h5wxuser:watch:duration:" + param.getUserId() + ":" + param.getVideoId();
|
|
|
+ String redisKey = "h5wxuser:watch:duration:" + param.getUserId() + ":" + param.getVideoId() + ":" + param.getCompanyUserId();
|
|
|
try {
|
|
|
String durationStr = redisCache.getCacheObject(redisKey);
|
|
|
long duration = durationStr != null ? Long.parseLong(durationStr) : 0L;
|
|
@@ -1073,7 +1073,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
|
|
|
//会员-更新心跳时间
|
|
|
public void updateHeartbeatWx(FsUserCourseVideoUParam param) {
|
|
|
- String redisKey = "h5wxuser:watch:heartbeat:" + param.getUserId() + ":" + param.getVideoId();
|
|
|
+ String redisKey = "h5wxuser:watch:heartbeat:" + param.getUserId() + ":" + param.getVideoId() + ":" + param.getCompanyUserId();
|
|
|
redisCache.setCacheObject(redisKey, LocalDateTime.now().toString());
|
|
|
// 设置 Redis 记录的过期时间(例如 5 分钟)
|
|
|
redisCache.expire(redisKey, 300, TimeUnit.SECONDS);
|