|
|
@@ -3,6 +3,7 @@ package com.tzld.piaoquan.recommend.server.service.filter.strategy;
|
|
|
import com.tzld.piaoquan.recommend.server.service.PreViewedService;
|
|
|
import com.tzld.piaoquan.recommend.server.service.filter.FilterParam;
|
|
|
import com.tzld.piaoquan.recommend.server.service.filter.FilterStrategy;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -13,9 +14,7 @@ import java.util.List;
|
|
|
import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
-/**
|
|
|
- * @author dyp
|
|
|
- */
|
|
|
+@Slf4j
|
|
|
@Component
|
|
|
public class SessionPreViewedStrategy implements FilterStrategy {
|
|
|
@Autowired
|
|
|
@@ -24,9 +23,13 @@ public class SessionPreViewedStrategy implements FilterStrategy {
|
|
|
@Override
|
|
|
public List<Long> filter(FilterParam param) {
|
|
|
|
|
|
+
|
|
|
if (param == null) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
+
|
|
|
+ log.info("SessionPreViewedStrategy mid: {}", StringUtils.isBlank(param.getMid()) ? "" : param.getMid());
|
|
|
+
|
|
|
if (StringUtils.isBlank(param.getMid())
|
|
|
|| StringUtils.isBlank(param.getSessionId())
|
|
|
|| CollectionUtils.isEmpty(param.getVideoIds())) {
|