修改统计SQL
This commit is contained in:
parent
9c174712d5
commit
7b9fa77249
@ -343,7 +343,7 @@ public class AdminVideoInteractionService {
|
||||
public Integer queryWatchUserCount(Collection<Integer> videoIds) {
|
||||
QueryWrapper<VideoUserWatchCollect> wrapper = Wrappers.<VideoUserWatchCollect>query()
|
||||
// 总观看时长使用字段live_seconds,总人数使用字段vod_seconds
|
||||
.select("video_id, ifnull(count(0), 0) as vod_seconds")
|
||||
.select("count(0) as vod_seconds")
|
||||
.in("video_id", videoIds);
|
||||
VideoUserWatchCollect totalWatch = videoUserWatchCollectMapper.selectOne(wrapper);
|
||||
return totalWatch == null ? 0 : totalWatch.getVodSeconds();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user