瀏覽代碼

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-boot

syh 4 年之前
父節點
當前提交
c56bb665eb

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

@@ -1,61 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.MaterialCutFrameTask;
-import cn.com.ctop.common.module.service.IMaterialCutFrameService;
-import cn.com.ctop.common.module.service.IMaterialCutFrameTaskService;
-import cn.com.ctop.common.module.utils.Check;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import lombok.extern.slf4j.Slf4j;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.List;
-import java.util.concurrent.Executors;
-
-import static org.jeecg.modules.ctop.job.KuaishouDailyGroupReportLoadJob.executorService;
-
-/**
- * 获取抽帧视频
- */
-@Slf4j
-public class CutFrameJob implements Job {
-    @Autowired
-    private IMaterialCutFrameService materialCutFrameService;
-    @Autowired
-    private IMaterialCutFrameTaskService taskService;
-
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        Thread thread = new Thread() {
-            @Override
-            public void run() {
-
-                log.info("开始抽帧定时任务");
-                QueryWrapper<MaterialCutFrameTask> taskQueryWrapper = new QueryWrapper<>();
-                taskQueryWrapper.eq("job_status", 0);
-                //taskQueryWrapper.eq("cloud_type", 2);
-                List<MaterialCutFrameTask> list = taskService.list(taskQueryWrapper);
-
-                if (Check.isNull(list)) {
-                    return;
-                }
-                executorService = Executors.newFixedThreadPool(5);
-                list.forEach(cutFrameTask -> {
-                    executorService.submit(new Runnable() {
-                        @Override
-                        public void run() {
-                            //获取广告计划信息数据
-                            materialCutFrameService.loadCutFrame(cutFrameTask.getJobId(), cutFrameTask.getVideoSignature());
-                            //materialCutFrameService.loadCosCutFrame(cutFrameTask.getJobId(), cutFrameTask.getVideoSignature());  //腾讯云任务状态查询以及图片下载
-                        }
-                    });
-                });
-            }
-        };
-        thread.start();
-
-
-    }
-}

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/mapper/xml/ByteDanceAdvertisePlanMapper.xml

@@ -6,7 +6,7 @@
    SELECT
    name
    FROM ctop_bytedance_advertise_plan
-   WHERE advertiser_id = #{accountId}
+   WHERE account_id = #{accountId}
    and (cpa_bid &gt; #{maxBid} or bid &gt; #{maxBid})
    and toutiao_status = 'AD_STATUS_DELIVERY_OK'
     </select>
@@ -16,7 +16,7 @@
    SELECT
    name
    FROM ctop_bytedance_advertise_plan
-   WHERE advertiser_id = #{accountId}
+   WHERE account_id = #{accountId}
    and deep_cpabid &gt; #{maxCpaBid}
    and toutiao_status = 'AD_STATUS_DELIVERY_OK'
     </select>

+ 3 - 3
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/entity/BytedancePlanDailyReport.java

@@ -425,7 +425,7 @@ public class BytedancePlanDailyReport {
         if (null != playFeedBreak75) {
             this.play75FeedBreak = playFeedBreak75;
         }
-        Long nextDayOpen = data.getLong("next_day_open");
+        Long nextDayOpen = data.getLong("attribution_next_day_open_cnt");
         if (null != nextDayOpen) {
             this.nextDayOpen = nextDayOpen;
         }
@@ -509,7 +509,7 @@ public class BytedancePlanDailyReport {
         if (null != inAppPay) {
             this.inAppPay = inAppPay;
         }
-        BigDecimal nextDayOpenCost = data.getBigDecimal("next_day_open_cost");
+        BigDecimal nextDayOpenCost = data.getBigDecimal("attribution_next_day_open_cost");
         if (null != nextDayOpenCost) {
             this.nextDayOpenCost = nextDayOpenCost;
         }
@@ -525,7 +525,7 @@ public class BytedancePlanDailyReport {
         if (null != show) {
             this.showNum = show;
         }
-        BigDecimal nextDayOpenRate = data.getBigDecimal("next_day_open_rate");
+        BigDecimal nextDayOpenRate = data.getBigDecimal("attribution_next_day_open_rate");
         if (null != nextDayOpenRate) {
             this.nextDayOpenRate = nextDayOpenRate;
         }

+ 9 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java

@@ -151,7 +151,9 @@ public class ReportServiceImpl implements IReportService {
         var config = new SerializeConfig();
         config.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase;
         var jsonObject = JSONObject.parseObject(JSON.toJSONString(conditions, config));
+
         JSONObject getObject = getAdStat(token, jsonObject);
+       // System.out.println(conditions.getStartDate()  + " "  + conditions.getEndDate() + " " + getObject.getString("request_id"));
         if (null == getObject) {
             log.error("广告计划报表数据获取异常=》account:{};message:{}", token.getAccountId(), "返回数据异常");
             return;
@@ -381,6 +383,13 @@ public class ReportServiceImpl implements IReportService {
         JSONArray groupBy = new JSONArray();
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
+
+
+        JSONObject status = new JSONObject();
+        status.put("status","AD_STATUS_ALL");
+
+
+        conditions.put("filtering",status);
         conditions.put("group_by", groupBy);
         return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
     }