...
|
...
|
@@ -81,7 +81,7 @@ public class UserRecallResponseBuilder { |
|
|
}
|
|
|
int recallTotal = sknResultList.size();
|
|
|
//10、打印日志
|
|
|
logSknResultList(userRecallRequest,sknList);
|
|
|
logSknResultList(userRecallRequest, sknList);
|
|
|
return new UserRecallResponse(total, recallTotal, recallTotalPage, sknList);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -159,30 +159,13 @@ public class UserRecallResponseBuilder { |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @param userPriceAreas
|
|
|
* @param sknPriceArea
|
|
|
* @return
|
|
|
*/
|
|
|
private boolean isLikePriceArea(List<Integer> userPriceAreas, Integer sknPriceArea) {
|
|
|
try {
|
|
|
if (userPriceAreas == null || userPriceAreas.isEmpty()) {
|
|
|
return false;
|
|
|
}
|
|
|
return userPriceAreas.contains(sknPriceArea);
|
|
|
} catch (Exception e) {
|
|
|
RECALL_NEW_LOGGER.error(e.getMessage(), e);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 价格带左右各扩展一位
|
|
|
*
|
|
|
* @param userPriceAreas
|
|
|
* @param sknPriceArea
|
|
|
* @return
|
|
|
*/
|
|
|
private boolean isLikePriceAreaWithBStrategy(List<Integer> userPriceAreas, Integer sknPriceArea) {
|
|
|
private boolean isLikePriceArea(List<Integer> userPriceAreas, Integer sknPriceArea) {
|
|
|
Collections.sort(userPriceAreas);
|
|
|
int min = userPriceAreas.get(0);
|
|
|
int max = userPriceAreas.get(userPriceAreas.size() - 1);
|
...
|
...
|
@@ -224,7 +207,7 @@ public class UserRecallResponseBuilder { |
|
|
continue;
|
|
|
}
|
|
|
//2)如果是推荐出来的,则单独加分[以减分的方式依次保证顺序]
|
|
|
if (strategy.equals(StrategyEnum.REC_SKN)){
|
|
|
if (strategy.equals(StrategyEnum.REC_SKN)) {
|
|
|
sknResult.setScore((double) recommendSknIndex--);
|
|
|
continue;
|
|
|
}
|
...
|
...
|
@@ -264,8 +247,8 @@ public class UserRecallResponseBuilder { |
|
|
iterator.remove();
|
|
|
}
|
|
|
}
|
|
|
commonCtrValueResultList = CollectionUtils.safeSubList(commonCtrValueResultList, 0, pageSize);
|
|
|
commonHeatValueResultList = CollectionUtils.safeSubList(commonHeatValueResultList, 0, pageSize);
|
|
|
commonCtrValueResultList = CollectionUtils.safeSubList(commonCtrValueResultList, 0, SknCountConstants.COMMON_CTR_VALUE_RETURN_COUNT);
|
|
|
commonHeatValueResultList = CollectionUtils.safeSubList(commonHeatValueResultList, 0, SknCountConstants.COMMON_HEAT_VALUE_RETURN_COUNT);
|
|
|
sknResultList.addAll(commonCtrValueResultList);
|
|
|
sknResultList.addAll(commonHeatValueResultList);
|
|
|
//3.1:如果是数量少于一页,则加会兜底的数据
|
...
|
...
|
|