//package com.tzld.piaoquan.ad.engine.service.predict.model.threshold;
//
//import com.alibaba.fastjson.JSONObject;
//import com.tzld.piaoquan.ad.engine.commons.score.AdConfig;
//import com.tzld.piaoquan.ad.engine.commons.score.ScoreParam;
//import com.tzld.piaoquan.ad.engine.commons.score.ScorerUtils;
//import com.tzld.piaoquan.ad.engine.commons.util.CommonCollectionUtils;
//import com.tzld.piaoquan.ad.engine.service.predict.container.PredictPidContainer;
//import com.tzld.piaoquan.ad.engine.service.predict.container.RandWContainer;
//import com.tzld.piaoquan.ad.engine.service.predict.container.ThresholdModelContainer;
//import com.tzld.piaoquan.ad.engine.service.predict.param.ThresholdPredictModelParam;
//import com.tzld.piaoquan.ad.engine.service.remote.FeatureRemoteService;
//import com.tzld.piaoquan.recommend.feature.domain.ad.base.AdRankItem;
//import com.tzld.piaoquan.recommend.feature.domain.ad.base.AdRequestContext;
//import com.tzld.piaoquan.recommend.feature.domain.ad.base.UserAdFeature;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//import java.time.LocalDateTime;
//import java.time.format.DateTimeFormatter;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//import java.util.Random;
//import java.util.concurrent.Executors;
//import java.util.concurrent.ScheduledExecutorService;
//import java.util.concurrent.TimeUnit;
//
//import static com.tzld.piaoquan.ad.engine.commons.score.ScorerUtils.BREAK_CONFIG;
//import static com.tzld.piaoquan.ad.engine.commons.score.ScorerUtils.SHARE0_CONFIG;
//
//@Component
//public class NoShareUserThresholdPredictModel extends ThresholdPredictModel {
//    private final static Logger log = LoggerFactory.getLogger(NoShareUserThresholdPredictModel.class);
//
//    @Value("${ad.predict.threshold.share0:0.4}")
//    private double threshold;
//    @Value("${ad.model.pid.type.share0:-1}")
//    private double pidType;
//
//
//    @Override
//    String initName() {
//        return "share0";
//    }
//
//    @Override
//    public Map<String, Object> predict(ThresholdPredictModelParam modelParam) {
//
//        double score=(modelParam.getMid().hashCode()+ RandWContainer.getRandW())%100/100d;
//        score=score<0?-score:score;
//
//        Map<String, Object> result = new HashMap<>();
////        result.put("threshold", realThreshold);
////        result.put("score", maxItem == null ? -1 : maxItem.getScore());
//        result.put("ad_predict", score<threshold?2:1);
//        result.put("score", score);
//
//        return result;
//    }
//}
