...
|
...
|
@@ -42,8 +42,8 @@ public class RecallResultBuilder { |
|
|
if (recallTotalPage == 0) {
|
|
|
recallTotalPage = 1;
|
|
|
}
|
|
|
if (recallTotalPage > 5) {
|
|
|
recallTotalPage = 5;
|
|
|
if (recallTotalPage > 8) {
|
|
|
recallTotalPage = 8;
|
|
|
}
|
|
|
sknResultList = CollectionUtils.safeSubList(sknResultList,0,recallTotalPage * param.getPageSize());
|
|
|
|
...
|
...
|
@@ -65,7 +65,11 @@ public class RecallResultBuilder { |
|
|
//1、计算得分
|
|
|
String vector = userPersonalFactorRsp.getVector();//TODO
|
|
|
for (RecallMergerResult.SknResult sknResult : sknResultList) {
|
|
|
sknResult.setScore(Math.random());
|
|
|
if(StrategyNameEnum.COMMON.name().equalsIgnoreCase(sknResult.getRequestType())){
|
|
|
sknResult.setScore(1 + (Math.random()));
|
|
|
}else{
|
|
|
sknResult.setScore(2 + (Math.random()));
|
|
|
}
|
|
|
}
|
|
|
//2、按得分排序
|
|
|
Collections.sort(sknResultList, new Comparator<RecallMergerResult.SknResult>() {
|
...
|
...
|
|