|
@@ -12,7 +12,6 @@ import com.tzld.piaoquan.ad.engine.service.score.param.RankRecommendRequestParam
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.context.ApplicationContext;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
@@ -37,6 +36,13 @@ public class RankServiceImpl implements RankService {
|
|
|
getAllAdFeatureList(
|
|
|
CommonCollectionUtils.toList(request.getAdIdList(),id->id.toString())
|
|
|
);
|
|
|
+ //兜底方案
|
|
|
+ if(rankItems==null|| rankItems.size()==0){
|
|
|
+ AdRankItem adRankItem=new AdRankItem();
|
|
|
+ adRankItem.setAdId(request.getAdIdList().get(0));
|
|
|
+ rankItems=new ArrayList<>();
|
|
|
+ rankItems.add(adRankItem);
|
|
|
+ }
|
|
|
List<AdRankItem> rankResult = ScorerUtils
|
|
|
.getScorerPipeline(
|
|
|
ScorerUtils.BASE_CONF)
|