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

Merge branch 'video-dev' into test

hcst_sunzhen преди 5 години
родител
ревизия
b6e3f04678

+ 19 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/DTO/AccountReportDTO.java

@@ -0,0 +1,19 @@
+package cn.com.ctop.toutiao.modules.report.DTO;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+
+@Data
+public class AccountReportDTO implements Serializable {
+    private String startDate;
+    private String endDate;
+    private BigDecimal discount;  //仅头条内广可用 折扣
+    private BigDecimal point;  //仅头条可用 返点
+    private List<Long> accountIds;
+    private Integer statHour;
+    private Integer type;
+}

+ 2 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/ByteDanceVideoReportDailyController.java

@@ -275,6 +275,7 @@ public class ByteDanceVideoReportDailyController {
 			 for (ByteDanceVideoReportDaily sum : list) {
 				 List<Object> ByteDanceVideoReportDaily = new ArrayList();
 				 ByteDanceVideoReportDaily.add(sum.getAdvertiserName());  //客户
+				 ByteDanceVideoReportDaily.add(sum.getProjectName());  //项目名称
 				 ByteDanceVideoReportDaily.add(sum.getVideoUrl() );  //视频链接
 				 ByteDanceVideoReportDaily.add(DateUtils.formatDate(sum.getStatDatetime()));  //时间
 				 ByteDanceVideoReportDaily.add(sum.getCost());  //消耗
@@ -283,7 +284,7 @@ public class ByteDanceVideoReportDailyController {
 			 }
 		 }
 
-		 String[] groupHeaders = {"客户","视频链接", "时间", "消耗","环比"};
+		 String[] groupHeaders = {"客户","项目名称","视频链接", "时间", "消耗","环比"};
 		 OutputStream os = response.getOutputStream();
 		 ExportExcelUtils eeu = new ExportExcelUtils();
 		 XSSFWorkbook workbook = new XSSFWorkbook();

+ 34 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceAdvertiserDailyReportController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.utils.StringUtils;
+import cn.com.ctop.toutiao.modules.report.DTO.AccountReportDTO;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceAdvertiserDailyReport;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceAdvertiserDailyReportService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -163,4 +164,37 @@ public class BytedanceAdvertiserDailyReportController {
         }
         return result;
     }
+
+
+
+
+
+
+
+
+
+    @AutoLog(value = "头条账户报表统计-指标统计")
+    @ApiOperation(value = "头条账户报表统计-指标统计", notes = "头条账户报表统计-指标统计")
+    @GetMapping(value = "/bytedanceAccountReportStatistics")
+    public Result bytedanceAccountReportStatistics(@RequestBody AccountReportDTO accountReportDTO) {
+        Result<BytedanceAdvertiserDailyReport> result = new Result<>();
+        result.setSuccess(true);
+        //判断必填字段
+
+
+        return result;
+    }
+
+
+    @AutoLog(value = "头条账户报表统计-账户列表及汇总")
+    @ApiOperation(value = "头条账户报表统计-账户列表及汇总", notes = "头条账户报表统计-账户列表及汇总")
+    @GetMapping(value = "/bytedanceAccountReportListAndCollect")
+    public Result bytedanceAccountReportListAndCollect(@RequestBody AccountReportDTO accountReportDTO) {
+        Result<BytedanceAdvertiserDailyReport> result = new Result<>();
+        result.setSuccess(true);
+
+        return result;
+    }
+
+
 }

+ 6 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/ByteDanceVideoReportDailyMapper.xml

@@ -288,6 +288,8 @@
 
     <select id="videoInfoListDetail" resultType="cn.com.ctop.toutiao.modules.report.entity.ByteDanceVideoReportDaily">
                 select
+                a.project_id as projectId,
+                a.project_name as projectName,
                 a.account_id as accountId,
                 a.advertiser_id as advertiserId,
                 a.advertiser_name as advertiserName,
@@ -319,6 +321,8 @@
 
     <select id="videoInfoListDetailOperator" resultType="cn.com.ctop.toutiao.modules.report.entity.ByteDanceVideoReportDaily">
         select
+        a.project_id as projectId,
+        a.project_name as projectName,
         a.account_id as accountId,
         a.advertiser_id as advertiserId,
         a.advertiser_name as advertiserName,
@@ -347,6 +351,8 @@
 
     <select id="videoInfoListDetailDesign" resultType="cn.com.ctop.toutiao.modules.report.entity.ByteDanceVideoReportDaily">
         select
+        a.project_id as projectId,
+        a.project_name as projectName,
         a.account_id as accountId,
         a.advertiser_id as advertiserId,
         a.advertiser_name as advertiserName,

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

@@ -1,5 +1,6 @@
 package cn.com.ctop.toutiao.modules.report.service.impl;
 
+import cn.com.ctop.toutiao.modules.report.DTO.AccountReportDTO;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceAdvertiserDailyReport;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceAdvertiserDailyReportMapper;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceAdvertiserDailyReportService;
@@ -7,6 +8,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.util.List;
+
 /**
  * @Description: 广告主日报表
  * @Author: jeecg-boot
@@ -18,4 +22,44 @@ import org.springframework.stereotype.Service;
 
 public class BytedanceAdvertiserDailyReportServiceImpl extends ServiceImpl<BytedanceAdvertiserDailyReportMapper, BytedanceAdvertiserDailyReport> implements IBytedanceAdvertiserDailyReportService {
 
+    public void bytedanceAccountReportStatistics(AccountReportDTO accountReportDTO){
+        String startDate = accountReportDTO.getStartDate();
+        String endDate = accountReportDTO.getEndDate();
+        BigDecimal discount = accountReportDTO.getDiscount();  //仅头条内广可用 折扣
+        BigDecimal point = accountReportDTO.getPoint();  //仅头条可用 返点
+        List<Long> accountIds = accountReportDTO.getAccountIds();
+        Integer statHour = accountReportDTO.getStatHour();
+        Integer type = accountReportDTO.getType();  //1今天  2昨天和其他单天 3近一周、15天、1月、3月按钮 4六个月、一年 5输入框输入的除了单天的时间段
+
+        //type=1分时操作
+        if(type == 1){
+
+        }else if(type == 2){
+
+        }else if(type == 3 || type == 5){
+
+        }
+
+
+
+
+
+
+
+    }
+
+
+
+
+    public void bytedanceAccountReportListAndCollect(AccountReportDTO accountReportDTO){
+
+
+
+
+
+
+
+    }
+
+
 }