jch 1 dia atrás
pai
commit
f3eb10e411

+ 5 - 5
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/strategy/RankStrategyBasic.java

@@ -434,11 +434,11 @@ public abstract class RankStrategyBasic implements RankStrategy {
 
     protected boolean getIsGuaranteedFlow(ScoreParam scoreParam) {
         // 817实验不要保量
-        if( scoreParam.getEngineInfo() != null && "817".equals(scoreParam.getEngineInfo().get("model"))){
+        if (scoreParam.getEngineInfo() != null && "817".equals(scoreParam.getEngineInfo().get("model"))) {
             return false;
         }
         // 819实验不要保量
-        if( valid819Ab(scoreParam)){
+        if (valid819Ab(scoreParam)) {
             return false;
         }
         if (System.currentTimeMillis() < guaranteeSwitchingTime) {
@@ -449,7 +449,7 @@ public abstract class RankStrategyBasic implements RankStrategy {
         return i < guaranteeWeight;
     }
 
-    private boolean valid819Ab(ScoreParam scoreParam){
+    private boolean valid819Ab(ScoreParam scoreParam) {
         // 819实验判断
         boolean in819Ab = scoreParam.getEngineInfo() != null
                 && "819".equals(scoreParam.getEngineInfo().get("ecpm_model"))
@@ -1051,9 +1051,9 @@ public abstract class RankStrategyBasic implements RankStrategy {
     protected double getH5SuppressWeight(AdRankItem item) {
         try {
             if (null != h5ScoreSuppress && null != item) {
-                int landingPageType = item.getLandingPageType();
+                Integer landingPageType = item.getLandingPageType();
                 String profession = item.getProfession();
-                if (2 == landingPageType && h5ScoreSuppress.containsKey(profession)) {
+                if (null != landingPageType && landingPageType.equals(2) && h5ScoreSuppress.containsKey(profession)) {
                     return h5ScoreSuppress.get(profession);
                 }
             }