|
@@ -206,8 +206,10 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
GuaranteeView guaranteeView = map.get(adVerId);
|
|
|
if (guaranteeView != null) {
|
|
|
double guaranteeWeight = calculateGuaranteedWeight(guaranteeView);
|
|
|
+ boolean isGuaranteed = isGuaranteed(guaranteeView);
|
|
|
ext.put("guaranteeView", guaranteeView.toString());
|
|
|
ext.put("guaranteeWeight", guaranteeWeight);
|
|
|
+ ext.put("isGuaranteed", isGuaranteed);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -242,6 +244,14 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
return guaranteeWeight;
|
|
|
}
|
|
|
|
|
|
+ protected boolean isGuaranteed(GuaranteeView guaranteeView) {
|
|
|
+ if (guaranteeView == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return guaranteeView.getGuaranteeNum() != null && guaranteeView.getGuaranteeNum() != 0
|
|
|
+ && guaranteeView.getGuaranteeRate() != null && guaranteeView.getGuaranteeRate() != 0.0;
|
|
|
+ }
|
|
|
+
|
|
|
protected double getGuaranteeScoreCoefficient(ScoreParam scoreParam, Map<String, Object> ext) {
|
|
|
if (scoreParam.getExpCodeSet().contains(guaranteeExp)) {
|
|
|
if (ext.get("guaranteeWeight") == null) {
|