瀏覽代碼

计划类型,提升用户活跃

yumeng 4 年之前
父節點
當前提交
edeab3f074

+ 10 - 6
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -20,7 +20,6 @@ import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataServ
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceAccountReportTaskRecord;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMaterialDailyMapper;
 import cn.com.ctop.toutiao.modules.report.service.*;
-import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.junit.Test;
@@ -71,6 +70,8 @@ public class SampleTest {
     private IKuaishouReportDailyGroupService reportDailyGroupService;
     @Autowired
     private IEtlKuaiShouAccountMaterialOverviewService kuaiShouAccountMaterialOverviewService;
+    @Autowired
+    private IKuaiShouGroupService kuaiShouGroupService;
 
 
     @Test
@@ -81,7 +82,10 @@ public class SampleTest {
         CtopOauthToken token = new CtopOauthToken();
         token.setAccountId(9901975L);
         token.setAccessToken("1c7cebebc3174c39fe941d136df65b1d");
-        kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate2, getDate,"adScene");
+
+        kuaiShouGroupService.getGroupListByPage("90f31a01c2137aa11c8686e86064b630",9845316L,null,1);
+
+//        kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate2, getDate, "adScene");
 
      /*   JSONObject materialOverview = kuaiShouAccountMaterialOverviewService.getMaterialOverview(5473041L, "2021-03-09");
         System.err.println(materialOverview);*/
@@ -610,11 +614,11 @@ public class SampleTest {
     private IEtlKuaishouVideoInfoService videoEtlInfoService;
 
     @Test
-    public void etlKuaishouVideoInfo(){
-        Date startDate = DateUtils.parseDate("2020-09-11","yyyy-MM-dd");
-        for(int i=0;i<365;i++){
+    public void etlKuaishouVideoInfo() {
+        Date startDate = DateUtils.parseDate("2020-09-11", "yyyy-MM-dd");
+        for (int i = 0; i < 365; i++) {
 //            dailyService.etlKuaishouAccountMaterialReportDailyData(DateUtils.formatDate(DateUtils.addDay(startDate,i)));
-            videoEtlInfoService.etlKuaishouVideoInfo(DateUtils.formatDate(DateUtils.addDay(startDate,i)));
+            videoEtlInfoService.etlKuaishouVideoInfo(DateUtils.formatDate(DateUtils.addDay(startDate, i)));
         }
     }
 

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouGroup.java

@@ -110,6 +110,7 @@ public class KuaiShouGroup {
      * 落地页链接
      */
     private Object url;
+    private String schemaUri;
     /**
      * APP ID
      */
@@ -120,7 +121,6 @@ public class KuaiShouGroup {
     private String appIconUrl;
 
 
-
     // 转化目标
     private Long convertId;
     // 转化目标

+ 2 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouGroupMapper.xml

@@ -28,6 +28,7 @@
         unit_type,
         url_type,
         url,
+        schema_uri,
         app_id,
         app_icon_url,
         convert_id,
@@ -66,6 +67,7 @@
             #{getGroup.unitType},
             #{getGroup.urlType},
             #{getGroup.url},
+            #{getGroup.schemaUri},
             #{getGroup.appId},
             #{getGroup.appIconUrl},
             #{getGroup.convertId},

+ 5 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouGroupServiceImpl.java

@@ -86,7 +86,9 @@ public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, K
         String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GROUP_LIST;
         JSONObject param = new JSONObject();
         param.put("advertiser_id", accountId);
-        param.put("campaign_id", campaignId);
+        if(!Check.isNull(campaignId)){
+            param.put("campaign_id", campaignId);
+        }
         param.put("page_size", 500);
         param.put("page", page);
 
@@ -96,6 +98,7 @@ public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, K
 
         String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
         JSONObject resultJson = JSONObject.parseObject(result);
+        System.err.println(resultJson);
         if (Check.isNull(resultJson)) {
             log.error("获取广告组接口异常,advertiserId:{}", accountId);
             return;
@@ -424,6 +427,7 @@ public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, K
                     group.setUnitType(detail.getInteger("unit_type"));
                     group.setUrlType(detail.getInteger("url_type"));
                     group.setUrl(detail.getString("url"));
+                    group.setSchemaUri(detail.getString("schema_uri"));
                     group.setAppId(detail.getLong("app_id"));
                     group.setAppIconUrl(detail.getString("app_icon_url"));
                     group.setGroupCreateTime(detail.getString("create_time"));

+ 1 - 11
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -18,7 +18,6 @@ import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResultToken;
 import cn.com.ctop.kuaishou.modules.report.entity.*;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAccountMapper;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyCampaignMapper;
-import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyGroupMapper;
 import cn.com.ctop.kuaishou.modules.report.service.*;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -71,10 +70,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     @Autowired
     private IKuaiShouCreativeService creativeService;
     @Autowired
-    private KuaiShouConversionInfosMapper conversionInfosMapper;
-    @Autowired
-    private KuaiShouConversionTypesMapper conversionTypesMapper;
-    @Autowired
     private KuaiShouRegionListChildrenMapper regionListChildrenMapper;
     @Autowired
     private KuaiShouRegionListParentMapper regionListParentMapper;
@@ -95,8 +90,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     @Autowired
     private IKuaishouReportDailyCampaignService dailyCampaignService;
     @Autowired
-    private KuaishouReportDailyGroupMapper dailyGroupMapper;
-    @Autowired
     private IKuaishouReportHourlyGroupService hourlyGroupService;
     @Autowired
     private IKuaishouReportDailyCreativeService dailyCreativeService;
@@ -113,8 +106,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     @Autowired
     private IUserAllocationService userAllocationService;
     @Autowired
-    private IKuaishouReportDailyCreativeStatisticService dailyCreativeStatisticService;
-    @Autowired
     private IKuaiShouHistoryReportTaskService historyReportTaskService;
     @Autowired
     private IKuaiShouImageGetService kuaiShouImageGetService;
@@ -125,8 +116,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     @Autowired
     private IKuaiShouGroupService getKuaiShouGroupService;
     @Autowired
-    private IKuaiShouAdvertiserBaseInfoService KuaiShouAdvertiserBaseInfoService;
-    @Autowired
     private IWarningOperationService warningOperationService;
 
 
@@ -1328,6 +1317,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     group.setUnitType(detail.getInteger("unit_type"));
                     group.setUrlType(detail.getInteger("url_type"));
                     group.setUrl(detail.getString("url"));
+                    group.setSchemaUri(detail.getString("schema_uri"));
                     group.setAppId(detail.getLong("app_id"));
                     group.setAppIconUrl(detail.getString("app_icon_url"));
                     group.setGroupCreateTime(detail.getString("create_time"));