Explorar el Código

添加出广告时间缓存用于判断出广告时间 更新时间为30秒1次

gufengshou1 hace 1 año
padre
commit
9fa7d5c75e
Se han modificado 16 ficheros con 301 adiciones y 15 borrados
  1. 32 0
      ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/feign/CommonResponse.java
  2. 51 0
      ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/feign/longvideo/abtest/LongVideoFeign.java
  3. 35 0
      ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/feign/longvideo/abtest/fallback/LongVideoFeignFallbackFactory.java
  4. 42 0
      ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/feign/longvideo/abtest/request/AbTestConfigRequest.java
  5. 10 0
      ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/math/Tuple.java
  6. 2 1
      ad-engine-server/src/main/java/com/tzld/piaoquan/ad/engine/server/Application.java
  7. 8 0
      ad-engine-server/src/main/java/com/tzld/piaoquan/ad/engine/server/controller/PredictController.java
  8. 6 1
      ad-engine-server/src/main/resources/application-dev.yml
  9. 79 0
      ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/container/AbTestConfigContainer.java
  10. 1 1
      ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/container/RoiPredictParamContainer.java
  11. 1 1
      ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/container/ThresholdModelContainer.java
  12. 24 8
      ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/impl/PredictModelServiceImpl.java
  13. 3 0
      ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/model/threshold/BasicThresholdPredictModel.java
  14. 1 1
      ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/model/threshold/RoiThresholdPredictModel.java
  15. 1 2
      ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/model/threshold/ScoreThresholdPredictModel.java
  16. 5 0
      pom.xml

+ 32 - 0
ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/feign/CommonResponse.java

@@ -0,0 +1,32 @@
+package com.tzld.piaoquan.ad.engine.commons.feign;
+
+
+import lombok.Data;
+
+/**
+ * Common Response
+ *
+ * @author ehlxr
+ */
+@Data
+public class CommonResponse<T> {
+    /**
+     * 返回状态码,0 表示业务成功
+     */
+    private int code = 0;
+    /**
+     * 返回消息
+     */
+    private String msg = "success";
+    /**
+     * 业务成功时返回数据
+     */
+    private T data;
+    /**
+     * 重定向
+     */
+    private String redirect;
+
+
+
+}

+ 51 - 0
ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/feign/longvideo/abtest/LongVideoFeign.java

@@ -0,0 +1,51 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright © 2021 xrv <xrg@live.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.tzld.piaoquan.ad.engine.commons.feign.longvideo.abtest;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.ad.engine.commons.feign.CommonResponse;
+import com.tzld.piaoquan.ad.engine.commons.feign.longvideo.abtest.fallback.LongVideoFeignFallbackFactory;
+import com.tzld.piaoquan.ad.engine.commons.feign.longvideo.abtest.request.AbTestConfigRequest;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+/**
+ * @author ehlxr
+ * @since 2022-10-10 11:42.
+ */
+@FeignClient(value = "longvideoapi", url = "${longvideo.feign.url:}",
+        path = "/longvideoapi",fallbackFactory = LongVideoFeignFallbackFactory.class)
+public interface LongVideoFeign {
+    /**
+     * 获取实验信息
+     */
+    @RequestMapping(value = "/openapi/abtest/typeValueConfig", method = RequestMethod.POST)
+    CommonResponse<JSONObject> getAbTestConfig(@RequestBody AbTestConfigRequest request);
+}
+
+

+ 35 - 0
ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/feign/longvideo/abtest/fallback/LongVideoFeignFallbackFactory.java

@@ -0,0 +1,35 @@
+package com.tzld.piaoquan.ad.engine.commons.feign.longvideo.abtest.fallback;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.ad.engine.commons.feign.CommonResponse;
+import com.tzld.piaoquan.ad.engine.commons.feign.longvideo.abtest.LongVideoFeign;
+import com.tzld.piaoquan.ad.engine.commons.feign.longvideo.abtest.request.AbTestConfigRequest;
+import org.springframework.cloud.openfeign.FallbackFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@Service
+public class LongVideoFeignFallbackFactory implements FallbackFactory<LongVideoFeignFallback> {
+    @Override
+    public LongVideoFeignFallback create(Throwable cause) {
+        return new LongVideoFeignFallback(cause);
+    }
+}
+
+class LongVideoFeignFallback implements LongVideoFeign {
+    private final Throwable th;
+
+    LongVideoFeignFallback(Throwable th) {
+        this.th = th;
+    }
+
+    @Override
+    public CommonResponse<JSONObject> getAbTestConfig(@RequestBody AbTestConfigRequest request) {
+        CommonResponse<JSONObject> response = new CommonResponse<>();
+        response.setMsg(th.getMessage());
+        response.setCode(1002);
+
+
+        return response;
+    }
+}

+ 42 - 0
ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/feign/longvideo/abtest/request/AbTestConfigRequest.java

@@ -0,0 +1,42 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright © 2022 xrv <xrv@live.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.tzld.piaoquan.ad.engine.commons.feign.longvideo.abtest.request;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @author ehlxr
+ * @since 2022-10-10 14:02.
+ */
+@ApiModel("获取 AB 实验信息参数")
+@Data
+@ToString
+public class AbTestConfigRequest {
+    private Integer appType;
+    private String typeValue;
+
+}

+ 10 - 0
ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/math/Tuple.java

@@ -0,0 +1,10 @@
+package com.tzld.piaoquan.ad.engine.commons.math;
+
+import lombok.Data;
+
+@Data
+public class Tuple<T> {
+    public T x;
+
+    public T y;
+}

+ 2 - 1
ad-engine-server/src/main/java/com/tzld/piaoquan/ad/engine/server/Application.java

@@ -7,6 +7,7 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.Bean;
@@ -25,7 +26,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
 @EnableAspectJAutoProxy
 @EnableScheduling
 @EnableApolloConfig
-@EnableFeignClients
+@EnableFeignClients("com.tzld.piaoquan.ad.engine.*")
 public class Application {
     public static void main(String[] args) {
         SpringApplication.run(Application.class, args);

+ 8 - 0
ad-engine-server/src/main/java/com/tzld/piaoquan/ad/engine/server/controller/PredictController.java

@@ -1,6 +1,7 @@
 package com.tzld.piaoquan.ad.engine.server.controller;
 
 import com.tzld.piaoquan.ad.engine.service.predict.PredictModelService;
+import com.tzld.piaoquan.ad.engine.service.predict.container.AbTestConfigContainer;
 import com.tzld.piaoquan.ad.engine.service.predict.param.request.RoiPredictModelRequestParam;
 import com.tzld.piaoquan.ad.engine.service.predict.param.request.ThresholdPredictModelRequestParam;
 import org.slf4j.Logger;
@@ -21,6 +22,8 @@ public class PredictController {
     @Autowired
     PredictModelService predictModelService;
 
+    @Autowired
+    AbTestConfigContainer adTestConfigContainer;
 
     /**
      * 没有统一封装response
@@ -39,4 +42,9 @@ public class PredictController {
         return predictModelService.adRecommendPredictByRoiModel(param);
     }
 
+    @RequestMapping("/test")
+    public void test(Integer appType,String typeValue){
+        adTestConfigContainer.initMap(appType,typeValue);
+    }
+
 }

+ 6 - 1
ad-engine-server/src/main/resources/application-dev.yml

@@ -166,4 +166,9 @@ oss:
       TemplateId: 2a5bf5963c9347df8eaddf662fbaf357
       PipelineId: abe6a0b9b9334858913eb416974485d2
       Location: oss-cn-hangzhou
-      bucket: art-pubbucket
+      bucket: art-pubbucket
+ad:
+  abtest:
+    time:
+      plan:
+        code:555

+ 79 - 0
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/container/AbTestConfigContainer.java

@@ -0,0 +1,79 @@
+package com.tzld.piaoquan.ad.engine.service.predict.container;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.ad.engine.commons.feign.CommonResponse;
+import com.tzld.piaoquan.ad.engine.commons.feign.longvideo.abtest.LongVideoFeign;
+import com.tzld.piaoquan.ad.engine.commons.feign.longvideo.abtest.request.AbTestConfigRequest;
+import com.tzld.piaoquan.ad.engine.commons.math.Tuple;
+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.util.*;
+
+@Component
+public class AbTestConfigContainer {
+    @Autowired
+    LongVideoFeign longVideoFeign;
+    @Value("${ad.abtest.time.plan.code:555}")
+    String adTestCode;
+
+
+    Map<String,List<Tuple<Integer>>> adTimePlanMap=new HashMap<>();
+    @PostConstruct
+    public void initContainer(){
+        Timer timer = new Timer();
+
+        timer.schedule(new TimerTask() {
+            @Override
+            public void run() {
+                initMap(null,"ab_test002");
+            }
+        }, 0, 1000*30);
+    }
+
+
+    public void initMap(Integer appType,String typeValue){
+        AbTestConfigRequest request=new  AbTestConfigRequest();
+        request.setAppType(0);
+        request.setTypeValue(typeValue);
+        CommonResponse<JSONObject> response=longVideoFeign.getAbTestConfig(request);
+        JSONObject object=response.getData();
+        System.out.println(adTestCode);
+        for(Map.Entry<String,Object> entry:object.getInnerMap().entrySet()){
+            for(Map<String,Object> map:(List<Map>)entry.getValue()){
+                if(adTestCode.equals(map.get("abExpCode").toString())){
+                    adTimePlanMap=JSONObject.parseObject(map.get("configValue").toString(),Map.class);
+                    break;
+                }
+            }
+        }
+
+    }
+
+    public Boolean containsCode(String code){
+        return adTimePlanMap.keySet().contains(code);
+    }
+
+    public Boolean inWithoutAdTime(String code,Integer hourOfDay){
+        Boolean flag=false;
+        for(Tuple<Integer> tuple:adTimePlanMap.getOrDefault(code,new ArrayList<>())){
+            if(tuple.getX()<=hourOfDay&&hourOfDay<tuple.getY()){
+                return true;
+            }
+        }
+        return flag;
+    }
+
+
+
+    public static void main(String[] args){
+        Map<String, Tuple<Integer>> map =new HashMap<>();
+        Tuple<Integer> t=new Tuple<>();
+        t.setX(1);
+        t.setY(2);
+        map.put("sk",t);
+        System.out.println(JSONObject.toJSONString(map));
+    }
+}

+ 1 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/containner/RoiPredictParamContainer.java → ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/container/RoiPredictParamContainer.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.ad.engine.service.predict.containner;
+package com.tzld.piaoquan.ad.engine.service.predict.container;
 
 import com.tzld.piaoquan.ad.engine.commons.redis.AlgorithmRedisHelper;
 import com.tzld.piaoquan.ad.engine.service.predict.constant.RuleRedisKeyConst;

+ 1 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/containner/ThresholdModelContainer.java → ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/container/ThresholdModelContainer.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.ad.engine.service.predict.containner;
+package com.tzld.piaoquan.ad.engine.service.predict.container;
 
 import com.tzld.piaoquan.ad.engine.service.predict.model.threshold.ThresholdPredictModel;
 import org.springframework.beans.factory.annotation.Autowired;

+ 24 - 8
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/impl/PredictModelServiceImpl.java

@@ -1,6 +1,7 @@
 package com.tzld.piaoquan.ad.engine.service.predict.impl;
 
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.tzld.piaoquan.ad.engine.commons.enums.AppTypeEnum;
 import com.tzld.piaoquan.ad.engine.commons.redis.AlgorithmRedisHelper;
 import com.tzld.piaoquan.ad.engine.commons.util.DateUtils;
@@ -8,7 +9,8 @@ import com.tzld.piaoquan.ad.engine.service.predict.config.RoiModelConfig;
 import com.tzld.piaoquan.ad.engine.service.predict.constant.RuleRedisKeyConst;
 import com.tzld.piaoquan.ad.engine.service.predict.PredictModelService;
 import com.tzld.piaoquan.ad.engine.service.predict.config.AbConfig;
-import com.tzld.piaoquan.ad.engine.service.predict.containner.ThresholdModelContainer;
+import com.tzld.piaoquan.ad.engine.service.predict.container.AbTestConfigContainer;
+import com.tzld.piaoquan.ad.engine.service.predict.container.ThresholdModelContainer;
 import com.tzld.piaoquan.ad.engine.service.predict.param.RoiThresholdPredictModelParam;
 import com.tzld.piaoquan.ad.engine.service.predict.param.RuleParamHelper;
 import com.tzld.piaoquan.ad.engine.service.predict.param.ThresholdPredictModelParam;
@@ -28,7 +30,7 @@ public class PredictModelServiceImpl implements PredictModelService {
     private String adOwnExperimentTier;
 
     @Autowired
-    RuleParamHelper paramHelper;
+    private AbTestConfigContainer container;
 
     @Autowired
     AlgorithmRedisHelper redisHelper;
@@ -40,15 +42,25 @@ public class PredictModelServiceImpl implements PredictModelService {
     RoiModelConfig roiModelConfig;
 
     public  Map<String,Object> adPredict(ThresholdPredictModelRequestParam requestParam){
-        //0-8不出广告
+
+        JSONObject object=requestParam.getAbExpInfo();
+        //先判断是否开启实验 和是否不出广告时间 而后判断默认0-8
         Map<String,Object> result=new HashMap<>();
         int hourOfDay= DateUtils.getCurrentHour();
-        if(hourOfDay<8&&hourOfDay>=0){
+        if(container.containsCode(requestParam.getAbTestCode())
+                &&
+                container.inWithoutAdTime(requestParam.getAbTestCode(),hourOfDay)){
+            result.put("ad_predict", 1);
+            result.put("no_ad_strategy","no_ad_time");
+            return result;
+        }else  if(hourOfDay<8&&hourOfDay>=0){
             result.put("ad_predict", 1);
             result.put("no_ad_strategy","no_ad_time");
             return result;
         }
 
+
+
         String[] abParamArr=abConfig.getAbParams(requestParam.getAbTestCode(),requestParam.getAbExpInfo());
         if(abParamArr==null){
             result.put("msg","abConfig_error");
@@ -76,8 +88,8 @@ public class PredictModelServiceImpl implements PredictModelService {
             midGroup = "mean_group";
         }
 
-        String[] noAdMidGroupList=new String[0];
-        noAdMidGroupList=((JSONArray) abtestParam.get("no_ad_mid_group_list")).toArray(noAdMidGroupList);
+        String[] noAdMidGroupList=(String[]) ((JSONArray) abtestParam.get("no_ad_mid_group_list")).toArray();
+
         boolean inNoAdGroup = false;
         for (String group : noAdMidGroupList) {
             if (group.equals(midGroup)) {
@@ -94,6 +106,10 @@ public class PredictModelServiceImpl implements PredictModelService {
             return result;
         }
 
+        String[] noAdGroupWithVideoMapping=(String[]) ((JSONArray) abtestParam.get("no_ad_mid_group_list")).toArray();
+
+
+
         //设置信息
         ThresholdPredictModelParam modelParam=ThresholdPredictModelParam.builder()
                 .build();
@@ -103,7 +119,7 @@ public class PredictModelServiceImpl implements PredictModelService {
         modelParam.setAbTestConfigTag(abTestConfigTag);
         modelParam.setAbtestParam(abtestParam);
         modelParam.setMidGroup(midGroup);
-        Object thresholdMixFunc=abtestParam.getOrDefault("threshold_mix_func","default");
+        Object thresholdMixFunc=abtestParam.getOrDefault("threshold_mix_func","basic");
         result= ThresholdModelContainer.
                 getThresholdPredictModel(thresholdMixFunc.toString())
                 .predict(modelParam);
@@ -112,7 +128,7 @@ public class PredictModelServiceImpl implements PredictModelService {
     }
 
     public Map<String,Object> adRecommendPredictByRoiModel(RoiPredictModelRequestParam requestParam){
-        //0-8不出广告
+
         Map<String,Object> result=new HashMap<>();
         int hourOfDay= DateUtils.getCurrentHour();
         if(hourOfDay<8&&hourOfDay>=0){

+ 3 - 0
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/model/threshold/BasicThresholdPredictModel.java

@@ -29,6 +29,9 @@ public class BasicThresholdPredictModel extends ThresholdPredictModel{
     }
 
     public Map<String, Object> predictWithRateProcess(ThresholdPredictModelParam modelParam,String midGroup){
+
+
+
 //        Double groupShareRate=paramHelper.getGroupShareRate(modelParam.getAbtestParam(),modelParam.getDate(),midGroup);
         Double groupShareRate=paramHelper.getGroupShareRateForBasic(modelParam.getAbtestParam(),modelParam.getDate(),midGroup);
 //        Double videoShareRate=paramHelper.getVideoShareRate(modelParam.getAbtestParam(),modelParam.getDate(),modelParam.getVideoId());

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

@@ -4,7 +4,7 @@ import com.tzld.piaoquan.ad.engine.commons.enums.AppTypeEnum;
 import com.tzld.piaoquan.ad.engine.commons.redis.AlgorithmRedisHelper;
 import com.tzld.piaoquan.ad.engine.service.predict.config.RoiModelConfig;
 import com.tzld.piaoquan.ad.engine.service.predict.constant.RuleRedisKeyConst;
-import com.tzld.piaoquan.ad.engine.service.predict.containner.RoiPredictParamContainer;
+import com.tzld.piaoquan.ad.engine.service.predict.container.RoiPredictParamContainer;
 import com.tzld.piaoquan.ad.engine.service.predict.param.RoiThresholdPredictModelParam;
 import com.tzld.piaoquan.ad.engine.service.predict.param.RuleParamHelper;
 import com.tzld.piaoquan.ad.engine.service.predict.param.ThresholdPredictModelParam;

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

@@ -4,14 +4,13 @@ import com.alibaba.fastjson.JSONObject;
 import com.tzld.piaoquan.ad.engine.commons.redis.AlgorithmRedisHelper;
 import com.tzld.piaoquan.ad.engine.service.predict.config.AdOutV1OnlineWeightConfig;
 import com.tzld.piaoquan.ad.engine.service.predict.constant.RuleRedisKeyConst;
-import com.tzld.piaoquan.ad.engine.service.predict.containner.ThresholdModelContainer;
+import com.tzld.piaoquan.ad.engine.service.predict.container.ThresholdModelContainer;
 import com.tzld.piaoquan.ad.engine.service.predict.param.RuleParamHelper;
 import com.tzld.piaoquan.ad.engine.service.predict.param.ThresholdPredictModelParam;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import javax.annotation.PostConstruct;
 import java.text.SimpleDateFormat;
 import java.util.*;
 

+ 5 - 0
pom.xml

@@ -312,6 +312,11 @@
                 </exclusion>
             </exclusions>
         </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
         <!--easyexcel-->
     </dependencies>