Преглед на файлове

增加原始公众号接口

xueyiming преди 4 месеца
родител
ревизия
ff3b7055ec

+ 2 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/BuckStrategyV1.java

@@ -2,6 +2,7 @@ package com.tzld.piaoquan.api.service.strategy.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
 import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
 import com.tzld.piaoquan.api.component.TouLiuHttpClient;
 import com.tzld.piaoquan.api.dao.mapper.AlgGhAutoreplyVideoRankDataMapper;
@@ -40,7 +41,7 @@ public class BuckStrategyV1 implements ReplyStrategyService {
      */
     private static final String bucketStrategyConfig = "{\"stg0909-base\":[5,6],\"stg0909-explore1\":[7],\"stg0909-explore2\":[8,9]}";
 
-    @Value("${bucketStrategyConfig:{}}")
+    @ApolloJsonValue("${bucketStrategyConfig:{}}")
     private String bucketStrategyConfigV2;
 
     /**

+ 1 - 0
api-module/src/main/resources/application-prod.properties

@@ -14,5 +14,6 @@ pushMessage.callback.topic=3rd_party_push_message_callback_prod
 pushMessage.callback.groupId=GID_3RD_PARTY_PUSH_MESSAGE_CALLBACK_PROD
 pushMessage.callback.tag=mini
 
+apollo.meta: http://apolloconfig-internal.piaoquantv.com
 
 

+ 4 - 0
api-module/src/main/resources/application.properties

@@ -39,3 +39,7 @@ rocketmq.secretKey=nEbq3xWNQd1qLpdy2u71qFweHkZjSG
 rocketmq.nameSrvAddr=http://MQ_INST_1894469520484605_BXhXuzkZ.mq-internet-access.mq-internet.aliyuncs.com:80
 
 
+app.id=longarticle-recommend
+apollo.bootstrap.enabled=true
+apollo.bootstrap.namespaces=application
+apollo.cacheDir=/datalog/apollo-cache-dir

+ 8 - 0
pom.xml

@@ -173,6 +173,14 @@
             <artifactId>ons-client</artifactId>
             <version>1.8.4.Final</version>
         </dependency>
+        
+        <!-- https://mvnrepository.com/artifact/com.ctrip.framework.apollo/apollo-client -->
+        <dependency>
+            <groupId>com.ctrip.framework.apollo</groupId>
+            <artifactId>apollo-client</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+
     </dependencies>
 
 </project>