|
@@ -1,6 +1,5 @@
|
|
|
package com.tzld.piaoquan.recommend.server.service;
|
|
|
|
|
|
-import com.google.common.base.Stopwatch;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.reflect.TypeToken;
|
|
|
import com.tzld.piaoquan.recommend.server.util.HttpClientFactory;
|
|
@@ -29,6 +28,8 @@ public class ViewedService {
|
|
|
|
|
|
@Value("${video.filter.url:}")
|
|
|
private String videoFilterUrl;
|
|
|
+ @Value("${securityAbExpCode:}")
|
|
|
+ private String securityAbExpCode;
|
|
|
|
|
|
private final CloseableHttpClient client = HttpClientFactory.create(1000, 1000, 200, 200, 0, 1000);
|
|
|
|
|
@@ -44,11 +45,10 @@ public class ViewedService {
|
|
|
|
|
|
// TODO 如果过滤失败,那么认为所有视频都被过滤掉
|
|
|
public List<Long> filterViewedVideo(int appType, String mid, String uid, List<Long> videoIds, String cityCode,
|
|
|
- String abCode, Long hotSceneType) {
|
|
|
+ Set<String> abExpCodes, Long hotSceneType) {
|
|
|
|
|
|
- Stopwatch stopwatch = Stopwatch.createStarted();
|
|
|
List<Integer> viewedTypes = new ArrayList<>(viewedTypesMap.getOrDefault(appType, defaultViewedTypes));
|
|
|
- if ("60106".equals(abCode)) {
|
|
|
+ if (abExpCodes.contains(securityAbExpCode)) {
|
|
|
viewedTypes.add(8);
|
|
|
}
|
|
|
CloseableHttpResponse chr = null;
|