|
@@ -44,13 +44,6 @@ public class RankServiceImpl implements RankService {
|
|
|
@Value("${ad.model.cpm.min:30}")
|
|
|
Double cpmMin=30d;
|
|
|
|
|
|
- static Map<String,Double> bidMap=new HashMap<>();
|
|
|
- @PostConstruct
|
|
|
- private void init(){
|
|
|
- bidMap.put("42",200d);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
public AdRankItem adItemRank(RankRecommendRequestParam request){
|
|
|
ScoreParam param= RequestConvert.requestConvert(request);
|
|
|
LocalDateTime currentTime = LocalDateTime.now();
|
|
@@ -81,21 +74,10 @@ public class RankServiceImpl implements RankService {
|
|
|
}
|
|
|
}
|
|
|
for(AdRankItem item:rankItems){
|
|
|
- item.setBid1(bidMap.getOrDefault(item.getItemFeature().getAdvertiserId(),1d));
|
|
|
-// item.setBid1(1d);
|
|
|
+ item.setBid1(1d);
|
|
|
item.setBid2(1d);
|
|
|
-// if(item.getAdId()==267) {
|
|
|
-// item.setCpa(150d);
|
|
|
-// }else {
|
|
|
-// item.setCpa(75d+bidMap.getOrDefault(item.getItemFeature().getAdvertiserId(),0d));
|
|
|
item.setCpa(75d);
|
|
|
-// }
|
|
|
-
|
|
|
-// if(item.getAdId()==409||item.getAdId()==487){
|
|
|
-// item.setPidLambda(10000d);
|
|
|
-// }else{
|
|
|
- item.setPidLambda(PidLambdaContainer.getPidLambda(item.getAdId()));
|
|
|
-// }
|
|
|
+ item.setPidLambda(PidLambdaContainer.getPidLambda(item.getAdId()));
|
|
|
}
|
|
|
|
|
|
//兜底方案
|
|
@@ -113,6 +95,7 @@ public class RankServiceImpl implements RankService {
|
|
|
object.put("lrsamples",rankResult.get(0).getLrSampleString());
|
|
|
object.put("dataTime",currentTime.format(timeFormatter));
|
|
|
log.info("svc=adItemRank {}", JSONObject.toJSONString(object));
|
|
|
+ log.info("svc=pid_log obj={}", JSONObject.toJSONString(object.remove("lrsamples")));
|
|
|
return rankResult.get(0);
|
|
|
}else {
|
|
|
//空返回值
|
|
@@ -210,7 +193,7 @@ public class RankServiceImpl implements RankService {
|
|
|
object.put("lrsamples",topItem.getLrSampleString());
|
|
|
object.put("dataTime",currentTime.format(timeFormatter));
|
|
|
log.info("svc=adBidRank {}", JSONObject.toJSONString(object));
|
|
|
-
|
|
|
+ log.info("svc=pid_log obj={}", JSONObject.toJSONString(object.remove("lrsamples")));
|
|
|
return result;
|
|
|
}
|
|
|
|