...
|
...
|
@@ -249,13 +249,14 @@ public class UserRecallResponseBuilder { |
|
|
// 3、插入【直通车】商品
|
|
|
iterator = sknResultList.iterator();
|
|
|
int index = 0;
|
|
|
int directTrainIndexInterval = searchDynamicConfigService.directTrainIndexInterval();
|
|
|
while (iterator.hasNext()) {
|
|
|
RecallMergerResult.SknResult sknResult = iterator.next();
|
|
|
// 生成插入位置-超出新列表的长度,则直接丢弃
|
|
|
int totalNewProductListSize = results.size();
|
|
|
int randomIndex = (int) (4 * (index++ + Math.random()));
|
|
|
int randomIndex = (int) (directTrainIndexInterval * (index++ + Math.random()));
|
|
|
if (randomIndex == 0 && !results.isEmpty()) {
|
|
|
randomIndex = 1;
|
|
|
randomIndex = 1;//不影响firstSkn
|
|
|
}
|
|
|
if (randomIndex <= totalNewProductListSize) {
|
|
|
results.add(randomIndex, sknResult);
|
...
|
...
|
|