|
@@ -68,10 +68,9 @@ public abstract class AbstractFilterService {
|
|
|
videoIds = filterByPreViewed(param.getAppType(), param.getMid(), videoIds);
|
|
|
}
|
|
|
if (param.isConcurrent()) {
|
|
|
- videoIds = filterByViewedConcurrent(param.getAppType(), param.getMid(), param.getUid(), videoIds,
|
|
|
- param.getCityCode());
|
|
|
+ videoIds = filterByViewedConcurrent(param.getAppType(), param.getMid(), param.getUid(), videoIds, param.getCityCode(), param.getAbCode());
|
|
|
} else {
|
|
|
- videoIds = filterByViewed(param.getAppType(), param.getMid(), param.getUid(), videoIds, param.getCityCode());
|
|
|
+ videoIds = filterByViewed(param.getAppType(), param.getMid(), param.getUid(), videoIds, param.getCityCode(), param.getAbCode());
|
|
|
}
|
|
|
return videoIds;
|
|
|
}
|
|
@@ -97,7 +96,7 @@ public abstract class AbstractFilterService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private List<Long> filterByViewedConcurrent(int appType, String mid, String uid, List<Long> videoIds, String cityCode) {
|
|
|
+ private List<Long> filterByViewedConcurrent(int appType, String mid, String uid, List<Long> videoIds, String cityCode, String abCode) {
|
|
|
// TODO uid为空时,还需要过滤么?
|
|
|
if (StringUtils.isBlank(mid)
|
|
|
|| CollectionUtils.isEmpty(videoIds)) {
|
|
@@ -119,7 +118,7 @@ public abstract class AbstractFilterService {
|
|
|
List<Future<List<Long>>> futures = new ArrayList<>();
|
|
|
for (final List<Long> ids : chunks) {
|
|
|
Future<List<Long>> future = pool.submit(() ->
|
|
|
- viewedService.filterViewedVideo(appType, mid, uid, ids, cityCode));
|
|
|
+ viewedService.filterViewedVideo(appType, mid, uid, ids, cityCode, abCode));
|
|
|
futures.add(future);
|
|
|
}
|
|
|
try {
|
|
@@ -143,13 +142,13 @@ public abstract class AbstractFilterService {
|
|
|
|
|
|
}
|
|
|
|
|
|
- private List<Long> filterByViewed(int appType, String mid, String uid, List<Long> videoIds, String cityCode) {
|
|
|
+ private List<Long> filterByViewed(int appType, String mid, String uid, List<Long> videoIds, String cityCode, String abCode) {
|
|
|
// TODO uid为空时,还需要过滤么?
|
|
|
if (StringUtils.isBlank(mid)
|
|
|
|| CollectionUtils.isEmpty(videoIds)) {
|
|
|
return videoIds;
|
|
|
}
|
|
|
- return viewedService.filterViewedVideo(appType, mid, uid, videoIds, cityCode);
|
|
|
+ return viewedService.filterViewedVideo(appType, mid, uid, videoIds, cityCode, abCode);
|
|
|
|
|
|
}
|
|
|
|