소스 검색

头条账户素材接口

hcst_sunzhen 5 년 전
부모
커밋
ce7eee0fdb

+ 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;
+}

+ 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;
+    }
+
+
 }

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

@@ -1,11 +1,15 @@
 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;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.util.List;
+
 /**
  * @Description: 广告主日报表
  * @Author: jeecg-boot
@@ -15,4 +19,44 @@ import org.springframework.stereotype.Service;
 @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){
+
+
+
+
+
+
+
+    }
+
+
 }