|
@@ -1,10 +1,13 @@
|
|
|
package com.tzld.piaoquan.recommend.server.service.rank;
|
|
package com.tzld.piaoquan.recommend.server.service.rank;
|
|
|
|
|
|
|
|
|
|
+import com.tzld.piaoquan.recommend.server.common.enums.TabType;
|
|
|
|
|
+import com.tzld.piaoquan.recommend.server.model.Tab;
|
|
|
import com.tzld.piaoquan.recommend.server.service.ExperimentService;
|
|
import com.tzld.piaoquan.recommend.server.service.ExperimentService;
|
|
|
import com.tzld.piaoquan.recommend.server.service.ServiceBeanFactory;
|
|
import com.tzld.piaoquan.recommend.server.service.ServiceBeanFactory;
|
|
|
import com.tzld.piaoquan.recommend.server.service.rank.strategy.*;
|
|
import com.tzld.piaoquan.recommend.server.service.rank.strategy.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -39,6 +42,7 @@ public class RankRouter {
|
|
|
STRATEGY_CLASSES.put("569", RankStrategy4RegionMergeModelV569.class);
|
|
STRATEGY_CLASSES.put("569", RankStrategy4RegionMergeModelV569.class);
|
|
|
STRATEGY_CLASSES.put("568", RankStrategy4RegionMergeModelV568.class);
|
|
STRATEGY_CLASSES.put("568", RankStrategy4RegionMergeModelV568.class);
|
|
|
STRATEGY_CLASSES.put("839", RankStrategy4RegionMergeModelV839.class);
|
|
STRATEGY_CLASSES.put("839", RankStrategy4RegionMergeModelV839.class);
|
|
|
|
|
+ STRATEGY_CLASSES.put("sequence", RankSequenceStrategy.class);
|
|
|
STRATEGY_CLASSES.put(relevantRank, RankStrategy4RelevantModelV1.class);
|
|
STRATEGY_CLASSES.put(relevantRank, RankStrategy4RelevantModelV1.class);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -59,7 +63,13 @@ public class RankRouter {
|
|
|
return strategyMap.get(relevantRank).rank(param);
|
|
return strategyMap.get(relevantRank).rank(param);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ Tab tab = param.getTab();
|
|
|
|
|
+ if (Objects.nonNull(tab) && StringUtils.isNotBlank(tab.getType())) {
|
|
|
|
|
+ TabType type = TabType.getByType(tab.getType());
|
|
|
|
|
+ if (Objects.equals(TabType.territory, type)) {
|
|
|
|
|
+ return strategyMap.get("sequence").rank(param);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 裂变层实验,使用RootSessionId尾号进行实验
|
|
// 裂变层实验,使用RootSessionId尾号进行实验
|
|
|
for (Map.Entry<String, RankService> entry : strategyMap.entrySet()) {
|
|
for (Map.Entry<String, RankService> entry : strategyMap.entrySet()) {
|