Bladeren bron

Merge remote-tracking branch 'origin/master'

zhaoxian 4 jaren geleden
bovenliggende
commit
bda00a79f5

+ 15 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -14,6 +14,7 @@ import cn.com.ctop.kuaishou.modules.batch.service.*;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import cn.com.ctop.kuaishou.modules.material.entity.KuaishouAccessToken;
 import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResultToken;
+import cn.com.ctop.kuaishou.modules.material.service.IEtlKuaishouVideoInfoService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
 import cn.com.ctop.toutiao.modules.link.service.IETLReportBytedanceVideoService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
@@ -1379,4 +1380,18 @@ public class TestController {
         ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
         return result;
     }
+
+    @Autowired
+    private IEtlKuaishouVideoInfoService videoEtlInfoService;
+
+    @GetMapping("loadJiaoyangData")
+    public Map<String,Object> testJiaoyangData(){
+        Map<String,Object>result = new HashMap<>();
+        Date startDate = DateUtils.addDay(new Date(), -10);
+        for(int i=0;i<=10;i++){
+            videoEtlInfoService.etlKuaishouVideoInfo(DateUtils.formatDate(DateUtils.addDay(startDate,i)));
+        }
+        ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
+        return result;
+    }
 }

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/MergeVideoJob.java

@@ -36,7 +36,6 @@ public class MergeVideoJob implements Job {
 
                     try {
                         String localPath = LoadFileUtil.downLoadFromUrl(url, PropertiesUtils.getValue("kuaishou_config", "video_sava_path"));
-//                        String localPath = LoadFileUtil.downLoadFromUrl(url,"D:/video/");
                         String md5 = LoadFileUtil.getMD5(localPath);
                         LoadFileUtil.delFile(localPath);
                         MaterialInfo materialInfo = new MaterialInfo();

+ 10 - 10
jeecg-boot-module-system/src/main/resources/application-wps.yml

@@ -95,21 +95,21 @@ spring:
         # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
-#        master:
-#          url: jdbc:mysql://139.186.27.96:4000/jiaoyang?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-#          username: data
-#          password: hcst@2021
-#          driver-class-name: com.mysql.jdbc.Driver
+        master:
+          url: jdbc:mysql://139.186.27.96:4000/jiaoyang?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          username: data
+          password: hcst@2021
+          driver-class-name: com.mysql.jdbc.Driver
 #        master:
 #          url: jdbc:mysql://139.186.151.174:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true
 #          username: hcst
 #          password: hcst@2020
 #          driver-class-name: com.mysql.jdbc.Driver
-        master:
-          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-          username: data
-          password: hcst@2021
-          driver-class-name: com.mysql.jdbc.Driver
+#        master:
+#          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+#          username: data
+#          password: hcst@2021
+#          driver-class-name: com.mysql.jdbc.Driver
   #redis 配置
   redis:
     database: 0

+ 8 - 5
module-common/src/main/java/cn/com/ctop/common/module/service/impl/CtopOauthTokenServiceImpl.java

@@ -13,10 +13,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xxl.job.core.context.XxlJobHelper;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.*;
 
 /**
@@ -36,9 +36,12 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
     private String bytedanceUrlApiPrefix;
     @Value("${bytedance.url.refresh-token}")
     private String bytedanceUrlRefreshToken;
-    @Autowired
+    @Value("${kuaishou.api-url}")
+    private String kuaishouApiUrl;
+
+    @Resource
     private CtopOauthTokenMapper ctopOauthTokenMapper;
-    @Autowired
+    @Resource
     private OauthAgentTokenMapper agentTokenMapper;
 
     @Override
@@ -123,7 +126,7 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
     @Override
     public void getKuaiShouRefreshToken(Long accountId, String token, String refreshToken, Long appId, String secret) {
         log.info("快手刷新token入参,accountId:{},token:{},refreshToken:{}", accountId, token, refreshToken);
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + "/rest/openapi/oauth2/authorize/refresh_token";
+        String url = kuaishouApiUrl + "/rest/openapi/oauth2/authorize/refresh_token";
         Map<String, String> headers = new HashMap<>();
         headers.put("Content-Type", " application/json");
         Map<String, Object> param = new HashMap<>();
@@ -245,7 +248,7 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
     @Override
     public void getKuaiShouAgentRefreshToken(Long agentId, String accessToken, String refreshToken) {
         log.info("快手刷新token入参,token:{},refreshToken:{}", accessToken, refreshToken);
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + "/rest/openapi/oauth2/authorize/refresh_token";
+        String url = kuaishouApiUrl + "/rest/openapi/oauth2/authorize/refresh_token";
         Map<String, String> headers = new HashMap<>();
         headers.put("Content-Type", " application/json");
         Map<String, Object> param = new HashMap<>();

+ 24 - 24
module-kuaishou/src/main/resources/kuaishou_config.properties

@@ -1,30 +1,12 @@
-#kuaishou_api_url=https://ad.e.kuaishou.com
-#kuaishou_auth_url=https://ad.e.kuaishou.com
-#kuaishou_appid=27
-#kuaishou_third_appid=328
-#oauth_type=agent
-#kuaishou_secret=QovprB1tNhXptgDc
-#kuaishou_third_secret=1iFTBiMdohkyEQQs
-#kuaishou_callback_url=http://adsp.c-top.com.cn:8080/jeecg-boot/kuaishou
-#kuaishou_third_callback_url=http://callback.shyouteng.com.cn/kuaishou
-#apk_sava_path=/mnt/file/apk
-#image_sava_path=/mnt/file/image
-#video_sava_path=/mnt/file/video
-### 模板视频存放路径
-#model_video_src_path=/mnt/data/src/
-### 片段合成视频存放路径
-#model_video_fill_path=/mnt/data/fill/
-###
-#model_video_final_path=/mnt/data/final/
-
-
-# jiaoyang
 kuaishou_api_url=https://ad.e.kuaishou.com
 kuaishou_auth_url=https://ad.e.kuaishou.com
-kuaishou_appid=328
+kuaishou_appid=27
+kuaishou_third_appid=328
 oauth_type=agent
-kuaishou_secret=1iFTBiMdohkyEQQs
-kuaishou_callback_url=http://callback.shyouteng.com.cn/kuaishou
+kuaishou_secret=QovprB1tNhXptgDc
+kuaishou_third_secret=1iFTBiMdohkyEQQs
+kuaishou_callback_url=http://adsp.c-top.com.cn:8080/jeecg-boot/kuaishou
+kuaishou_third_callback_url=http://callback.shyouteng.com.cn/kuaishou
 apk_sava_path=/mnt/file/apk
 image_sava_path=/mnt/file/image
 video_sava_path=/mnt/file/video
@@ -34,3 +16,21 @@ model_video_src_path=/mnt/data/src/
 model_video_fill_path=/mnt/data/fill/
 ##
 model_video_final_path=/mnt/data/final/
+
+
+# jiaoyang
+#kuaishou_api_url=https://ad.e.kuaishou.com
+#kuaishou_auth_url=https://ad.e.kuaishou.com
+#kuaishou_appid=328
+#oauth_type=agent
+#kuaishou_secret=1iFTBiMdohkyEQQs
+#kuaishou_callback_url=http://callback.shyouteng.com.cn/kuaishou
+#apk_sava_path=/mnt/file/apk
+#image_sava_path=/mnt/file/image
+#video_sava_path=/mnt/file/video
+## 模板视频存放路径
+#model_video_src_path=/mnt/data/src/
+## 片段合成视频存放路径
+#model_video_fill_path=/mnt/data/fill/
+##
+#model_video_final_path=/mnt/data/final/