|
@@ -48,6 +48,8 @@ public class RankServiceImpl implements RankService {
|
|
|
Double cpmMin=30d;
|
|
|
@Value("${ad.pid.cpc.exp:30}")
|
|
|
private String cpcPidExpCode;
|
|
|
+ @Value("${ad.cvr.adjusting.exp:652}")
|
|
|
+ private String cvrAdjustingExpCode;
|
|
|
|
|
|
public AdRankItem adItemRank(RankRecommendRequestParam request){
|
|
|
ScoreParam param= RequestConvert.requestConvert(request);
|
|
@@ -84,11 +86,15 @@ public class RankServiceImpl implements RankService {
|
|
|
}
|
|
|
}
|
|
|
boolean inCpcPidExp=false;
|
|
|
+ boolean inCvrAdjustingExp=false;
|
|
|
if (request.getAdAbExpArr() != null && request.getAdAbExpArr().size() != 0) {
|
|
|
for (Map<String, Object> map : request.getAdAbExpArr() ) {
|
|
|
if (map.getOrDefault("abExpCode", "").equals(cpcPidExpCode)) {
|
|
|
inCpcPidExp = true;
|
|
|
}
|
|
|
+ if (map.getOrDefault("abExpCode", "").equals(cvrAdjustingExpCode)) {
|
|
|
+ inCvrAdjustingExp = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
double lambda=-1d;
|
|
@@ -131,7 +137,7 @@ public class RankServiceImpl implements RankService {
|
|
|
|
|
|
// 兜底方案
|
|
|
List<AdRankItem> rankResult;
|
|
|
- if (inCpcPidExp) {
|
|
|
+ if (inCvrAdjustingExp) {
|
|
|
rankResult = rank(param, userAdFeature, rankItems, ScorerUtils.CVR_ADJUSTING);
|
|
|
} else {
|
|
|
rankResult = rank(param, userAdFeature, rankItems, ScorerUtils.BASE_CONF);
|
|
@@ -155,6 +161,7 @@ public class RankServiceImpl implements RankService {
|
|
|
AdPlatformCreativeDTO dto=groupMap.get(rankResult.get(0).getAdId()).get(0);
|
|
|
object.put("cpa",dto.getCpa()*dto.getBid1());
|
|
|
object.put("oCpa",dto.getCpa());
|
|
|
+ object.put("realECpm",rankResult.get(0).getEcpm1());
|
|
|
log.info("svc=cpc_pid obj={}", JSONObject.toJSONString(object));
|
|
|
}else {
|
|
|
log.info("svc=pid_log obj={}", JSONObject.toJSONString(object));
|