Переглянути джерело

594策略调整 保证跳出判定多次执行结果相同

gufengshou1 1 рік тому
батько
коміт
6682dfe893

+ 2 - 2
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/model/threshold/NoShareUserThresholdPredictModel.java

@@ -122,7 +122,8 @@ public class NoShareUserThresholdPredictModel extends ThresholdPredictModel {
 //            log.info("svc=Share0ThresholdPredictModel_predict modelName=ScoreV2ThresholdPredictModel maxItem={} extraParam={} app_type={} realThreshold={}",
 //                    JSONObject.toJSONString(maxItem), JSONObject.toJSONString(scoreParam.getExtraParam()),modelParam.getAppType(),realThreshold);
 //        }
-        double score=random.nextDouble();
+        double score=modelParam.getMid().hashCode()%100/100d;
+        score=score<0?-score:score;
 
         Map<String, Object> result = new HashMap<>();
 //        result.put("threshold", realThreshold);
@@ -132,5 +133,4 @@ public class NoShareUserThresholdPredictModel extends ThresholdPredictModel {
 
         return result;
     }
-
 }