Showing
1 changed file
with
7 additions
and
2 deletions
@@ -77,7 +77,7 @@ public class UserRecallResponseBuilder { | @@ -77,7 +77,7 @@ public class UserRecallResponseBuilder { | ||
77 | //8、构造返回结果 | 77 | //8、构造返回结果 |
78 | List<RecallSknInfo> sknList = new ArrayList<>(); | 78 | List<RecallSknInfo> sknList = new ArrayList<>(); |
79 | for (RecallMergerResult.SknResult sknResult : sknResultList) { | 79 | for (RecallMergerResult.SknResult sknResult : sknResultList) { |
80 | - //按优先级排序,去第一种召回策略 | 80 | + //按优先级排序,取第一种召回策略 |
81 | Collections.sort(sknResult.getStrategys(), (o1, o2) -> o2.getPriority().compareTo(o1.getPriority())); | 81 | Collections.sort(sknResult.getStrategys(), (o1, o2) -> o2.getPriority().compareTo(o1.getPriority())); |
82 | String requestType = sknResult.getStrategys().get(0).name(); | 82 | String requestType = sknResult.getStrategys().get(0).name(); |
83 | sknList.add(new RecallSknInfo(sknResult.getProductSkn(), requestType)); | 83 | sknList.add(new RecallSknInfo(sknResult.getProductSkn(), requestType)); |
@@ -152,7 +152,7 @@ public class UserRecallResponseBuilder { | @@ -152,7 +152,7 @@ public class UserRecallResponseBuilder { | ||
152 | if (sknResult.isLikePriceArea()) { | 152 | if (sknResult.isLikePriceArea()) { |
153 | score = score + 100; | 153 | score = score + 100; |
154 | } | 154 | } |
155 | - //2)判断兜底的数据是否参与评分 | 155 | + //2)如果兜底策略不参与评分,并且当前skn有其他的召回策略,则加分【将兜底和非兜底的拆分】 |
156 | if(!searchDynamicConfigService.searchPersionalNewStrategyCommonJoinScoreOpen() && !this.isCommonRecallOnly(sknResult)){ | 156 | if(!searchDynamicConfigService.searchPersionalNewStrategyCommonJoinScoreOpen() && !this.isCommonRecallOnly(sknResult)){ |
157 | score = score + 50; | 157 | score = score + 50; |
158 | } | 158 | } |
@@ -163,6 +163,11 @@ public class UserRecallResponseBuilder { | @@ -163,6 +163,11 @@ public class UserRecallResponseBuilder { | ||
163 | return sknResultList; | 163 | return sknResultList; |
164 | } | 164 | } |
165 | 165 | ||
166 | + /** | ||
167 | + * 当前商品是否只是兜底策略找回来的 | ||
168 | + * @param sknResult | ||
169 | + * @return | ||
170 | + */ | ||
166 | private boolean isCommonRecallOnly(RecallMergerResult.SknResult sknResult) { | 171 | private boolean isCommonRecallOnly(RecallMergerResult.SknResult sknResult) { |
167 | List<StrategyEnum> strategys = sknResult.getStrategys(); | 172 | List<StrategyEnum> strategys = sknResult.getStrategys(); |
168 | //1、非空判断 | 173 | //1、非空判断 |
-
Please register or login to post a comment