Ver código fonte

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
zhaoxian 4 anos atrás
pai
commit
91ba287e94
24 arquivos alterados com 973 adições e 260 exclusões
  1. 2 2
      jeecg-boot-module-system/src/main/resources/application.yml
  2. 22 40
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  3. 367 0
      module-common/src/main/java/cn/com/ctop/common/module/vo/KuaishouReportAccountDailyDTOEntity.java
  4. 36 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouController.java
  5. 22 15
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/BatchServiceImpl.java
  6. 3 3
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouHistoryReportTaskServiceImpl.java
  7. 89 29
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsVideoReportCtrl.java
  8. 3 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KsVideoReportMapper.java
  9. 2 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouReportDailyAccountMapper.java
  10. 55 12
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KsVideoReportMapper.xml
  11. 82 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyAccountMapper.xml
  12. 4 2
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/IKsVideoReportService.java
  13. 2 3
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/IKuaishouReportDailyAccountService.java
  14. 9 4
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KsVideoReportServiceImpl.java
  15. 3 2
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaiShouAccountReportServiceImpl.java
  16. 28 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyAccountServiceImpl.java
  17. 2 5
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceReportController.java
  18. 90 31
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceVideoReportCtrl.java
  19. 2 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/BytedanceVideoReportMapper.java
  20. 84 92
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/ByteDanceVideoReportDailyMapper.xml
  21. 52 9
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceVideoReportMapper.xml
  22. 4 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceVideoReportService.java
  23. 1 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceAccountReportServiceImpl.java
  24. 9 4
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceVideoReportServiceImpl.java

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

@@ -1,7 +1,7 @@
 spring:
   profiles:
-#    active: wps
-    active: @activatedProperties@
+    active: wps
+#    active: @activatedProperties@
 
 swagger:
   production: false

+ 22 - 40
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -7,16 +7,11 @@ import cn.com.ctop.common.module.entity.BindAccountLogin;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.message.handle.impl.EmailSendMsgHandle;
-import cn.com.ctop.common.module.service.IBindAccountLoginService;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.service.IUReportExportService;
-import cn.com.ctop.common.module.service.IUReportService;
-import cn.com.ctop.common.module.service.IUserAllocationService;
+import cn.com.ctop.common.module.service.*;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
-import cn.com.ctop.kuaishou.modules.report.service.IKuaishouZombieCreativeService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.modules.report.service.IByteDanceVideoReportDailyService;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
@@ -132,13 +127,14 @@ public class SampleTest {
 
     @Test
     public void testLoadBytedanceData() {
-        List<UserAllocation> allocations = allocationService.getByParams(435L, null, 0);
+        List<UserAllocation> allocations = allocationService.getByParams(633L, null, 0);
         for (UserAllocation allocation : allocations) {
-            for (int i = 2; i < 10; i++) {
+//            for (int i = 2; i < 10; i++) {
                 CtopOauthToken token = oauthTokenService.getTokenByAccountId(allocation.getAccountId());
-                Date getDate = DateUtils.addDay(new Date(), -i);
-                reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
-            }
+                Date getDate = DateUtils.addDay(new Date(), 0);
+//                reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+                reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
+//            }
         }
     }
 
@@ -178,11 +174,11 @@ public class SampleTest {
     public void loadAccountData() {
 //        List<UserAllocation> allocations = allocationService.getByParams(776L,null,0);
 //        for (UserAllocation allocation:allocations) {
-        CtopOauthToken token = tokenService.getTokenByAccountId(93238965516L);
-        for (int i = 92; i < 100; i++) {
-            Date getDate = DateUtils.addDay(new Date(), -i);
-            reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
-        }
+            CtopOauthToken token = tokenService.getTokenByAccountId(93238965516L);
+            for(int i=92;i<100;i++){
+                Date getDate = DateUtils.addDay(new Date(),-i);
+                reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+            }
 //        }
     }
 
@@ -194,23 +190,20 @@ public class SampleTest {
     IUReportService uReportService;
 
     @Test
-    public void loadBytedanceData() {
-        String strings = "1672894840372238_1674183267750990_1673076203257870_1650079154438157_1670286873337870_1648709018451972_1661556811389966_1676540488471559";
-        String[] tokens = strings.split("_");
-        for (int i = 0; i < tokens.length; i++) {
-            Long accountId = Long.parseLong(tokens[i]);
-            CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
-            for (int j = 10; j < 110; j++) {
+    public void loadBytedanceData(){
+        List<UserAllocation>allocations = allocationService.getByParams(633L,null,0);
+        for (int i=0;i<allocations.size();i++) {
+            CtopOauthToken token = tokenService.getTokenByAccountId(allocations.get(i).getAccountId());
+            for(int j=10;j<110;j++){
                 Date getDate = DateUtils.addDay(new Date(), -j);
-                reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+                reportService.getAdvertiserReport(token, getDate, getDate,CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
             }
-
         }
     }
 
     @Test
-    public void loaddata() {
-        for (int i = 0; i < 30; i++) {
+    public void loaddata(){
+        for(int i=0;i<30;i++){
             Date getDate = DateUtils.addDay(new Date(), -i);
             String date = DateUtils.formatDate(getDate);
             videoReportDailyService.videoInfoList(date, date);
@@ -222,10 +215,9 @@ public class SampleTest {
 
     @Autowired
     private IByteDanceVideoReportDailyService videoReportDailyService;
-
     @Test
-    public void loadMatData() {
-        List<UserAllocation> allocations = allocationService.getByParams(320L, null, 0);
+    public void loadMatData(){
+        List<UserAllocation> allocations = allocationService.getByParams(320L,null,0);
         countDownLatch = new CountDownLatch(allocations.size());
         executorService = Executors.newFixedThreadPool(2);
         allocations.forEach(allocation -> {
@@ -251,14 +243,4 @@ public class SampleTest {
         }
         XxlJobLogger.log("物料数据同步完成");
     }
-
-
-    @Autowired
-    private IKuaishouZombieCreativeService kuaishouZombieCreativeService;
-
-    @Test
-    public void checkZombieProject() {
-        kuaishouZombieCreativeService.checkZombieProject();
-    }
-
 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 367 - 0
module-common/src/main/java/cn/com/ctop/common/module/vo/KuaishouReportAccountDailyDTOEntity.java


+ 36 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouController.java

@@ -2,19 +2,31 @@ package cn.com.ctop.kuaishou.modules.batch.controller;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.utils.HttpUtils;
+import cn.com.ctop.common.module.vo.KuaishouReportAccountDailyDTOEntity;
+import cn.com.ctop.common.module.vo.SheetInfoVo;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouInfoDTO;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO;
 import cn.com.ctop.kuaishou.modules.report.entity.ProjectAccountDTO;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAccountService;
+import com.alibaba.excel.EasyExcelFactory;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.metadata.Sheet;
 import com.github.pagehelper.PageInfo;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -122,6 +134,30 @@ public class KuaiShouController {
         return result;
     }
 
+    @PostMapping("/exportKuaishouSaleProjectInfo")
+    public void exportKuaishouSaleProjectInfo(@RequestBody KuaishouInfoDTO dto, HttpServletResponse response) throws IOException {
+        Result<PageInfo<ProjectAccountDTO>> result = new Result<>();
+        result.setSuccess(true);
+
+        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+            result.setSuccess(false);
+            result.setMessage("参数有误");
+            return ;
+        }
+        //查询总的消耗信息
+        SheetInfoVo totalSheetVo = accountService.getKuaishouSaleProjectInfoSheetVO(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(),dto.getPageNum(),dto.getPageSize(),"", dto.getYn());
+        OutputStream outputStream = response.getOutputStream();
+        String date = DateUtils.formatDate(new Date());
+        HttpUtils.setResponseHeader(response, "快手销售报表" + date + ".xlsx");
+        ExcelWriter excelWriter = EasyExcelFactory.getWriter(outputStream);
+        Sheet sheet = new Sheet(1, 0, KuaishouReportAccountDailyDTOEntity.class);
+        sheet.setSheetName(totalSheetVo.getSheetName());
+        excelWriter.write(totalSheetVo.getDetails(), sheet);
+        excelWriter.finish();
+        outputStream.flush();
+        outputStream.close();
+    }
+
     @RequestMapping("/getKuaishouAccountInfoByProjectId")
     public Result<PageInfo<KuaishouReportDailyAccountDTO>> getKuaishouAccountInfoByProjectId(@RequestBody KuaishouInfoDTO dto) {
         Result<PageInfo<KuaishouReportDailyAccountDTO>> result = new Result<>();

+ 22 - 15
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/BatchServiceImpl.java

@@ -1863,13 +1863,13 @@ public class BatchServiceImpl implements IBatchService {
                         if (!Check.isNull(details)) {
                             JSONArray returnArr = new JSONArray();
                             for (int i = 0; i < details.size(); i++) {
-                                JSONObject jsonObject = details.getJSONObject(i);
+                                JSONObject firstJson = details.getJSONObject(i);
 
-                                String level = jsonObject.getString("level");
-                                if ("1".equals(level)) {
-                                    JSONArray LevelArr = getSubLevel(jsonObject.getInteger("category_id"), details);
-                                    jsonObject.put("child", LevelArr);
-                                    returnArr.add(jsonObject);
+                                Integer parent_id = firstJson.getInteger("parent_id");
+                                if (0 == parent_id) {
+                                    JSONArray LevelArr = getSecond(firstJson.getString("category_id"), details);
+                                    firstJson.put("child", LevelArr);
+                                    returnArr.add(firstJson);
                                 }
                             }
                             return returnArr;
@@ -1884,19 +1884,13 @@ public class BatchServiceImpl implements IBatchService {
     }
 
 
-    private JSONArray getSubLevel(Integer categoryId, JSONArray details) {
+    private JSONArray getSecond(String categoryId, JSONArray details) {
 
         JSONArray secondArr = new JSONArray();
         for (int i = 0; i < details.size(); i++) {
             JSONObject secondJson = details.getJSONObject(i);
-            if ("2".equals(secondJson.getString("level")) && categoryId.equals(secondJson.getInteger("parent_id"))) {
-                JSONArray thirdArr = new JSONArray();
-                for (int j = 0; j < details.size(); j++) {
-                    JSONObject thirdJson = details.getJSONObject(j);
-                    if ("3".equals(thirdJson.getString("level")) && secondJson.getInteger("category_id").equals(thirdJson.getInteger("parent_id"))) {
-                        thirdArr.add(thirdJson);
-                    }
-                }
+            if (categoryId.equals(secondJson.getString("parent_id"))) {
+                JSONArray thirdArr = getThird(secondJson.getString("category_id"), details);
                 secondJson.put("child", thirdArr);
                 secondArr.add(secondJson);
             }
@@ -1904,6 +1898,19 @@ public class BatchServiceImpl implements IBatchService {
         return secondArr;
     }
 
+
+    private JSONArray getThird(String categoryId, JSONArray details) {
+        JSONArray thirdArr = new JSONArray();
+        for (int i = 0; i < details.size(); i++) {
+            JSONObject thirdJson = details.getJSONObject(i);
+            String parent_id = thirdJson.getString("parent_id");
+            if (categoryId.equals(parent_id)) {
+                thirdArr.add(thirdJson);
+            }
+
+        }
+        return thirdArr;
+    }
 }
 
 

+ 3 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouHistoryReportTaskServiceImpl.java

@@ -273,13 +273,13 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
     private void getHistoryTypeList() {
 
         historyTypeList = new ArrayList<>();
-       /* historyTypeList.add(5);
+        historyTypeList.add(5);
         historyTypeList.add(1);
         historyTypeList.add(2);
         historyTypeList.add(3);
         historyTypeList.add(10);
-        historyTypeList.add(4);*/
-        historyTypeList.add(7);
+        historyTypeList.add(4);
+     //   historyTypeList.add(7);
 
 
     }

+ 89 - 29
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsVideoReportCtrl.java

@@ -46,10 +46,13 @@ public class KsVideoReportCtrl {
             JSONArray accountIds = requestBody.getJSONArray("accountIds");
             String startDate = requestBody.getString("startDate");
             String endDate = requestBody.getString("endDate");
+            String clip = requestBody.getString("clip");
+            String shot = requestBody.getString("shot");
+            String plan = requestBody.getString("plan");
             String target = requestBody.getString("target");
             String order = requestBody.getString("order");
-            int pageSize= requestBody.getInteger("pageSize");
-            int pageNo= requestBody.getInteger("pageNo");
+            int pageSize = requestBody.getInteger("pageSize");
+            int pageNo = requestBody.getInteger("pageNo");
 
             String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.dicMapKs);
 
@@ -57,7 +60,7 @@ public class KsVideoReportCtrl {
                 if(accountIds.isEmpty()){
                     accountIds=null;
                 }
-                PageInfo<JSONObject> listData = ksVideoReportService.getVideoReportBy(accountIds, startDate, endDate, filedAll, target, order,pageSize,pageNo);
+                PageInfo<JSONObject> listData = ksVideoReportService.getVideoReportBy(accountIds, startDate, endDate, filedAll, target, order, clip, shot,plan,pageSize, pageNo);
                 result.setResult(listData);
                 result.setSuccess(true);
             } catch (Exception e) {
@@ -68,47 +71,105 @@ public class KsVideoReportCtrl {
         return result;
     }
 
-    @PostMapping("/report/excel")
+    @PostMapping("/detail")
+    public Result<List<JSONObject>> getReportDetail(@RequestBody JSONObject requestBody) {
+        Result<List<JSONObject>> result = new Result<>();
+        if (requestBody.isEmpty()) {
+            log.error("request body is empty");
+            result.setSuccess(false);
+        } else {
+
+            JSONArray accountIds = requestBody.getJSONArray("accountIds");
+            String signature = requestBody.getString("signature");
+            String startDate = requestBody.getString("startDate");
+            String endDate = requestBody.getString("endDate");
+
+            String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.dicMapKs);
+
+            try {
+                if (accountIds.isEmpty()) {
+                    accountIds = null;
+                }
+                List<JSONObject> listData = ksVideoReportService.getVideoDetailBy(accountIds, startDate, endDate, filedAll,signature);
+                result.setResult(listData);
+                result.setSuccess(true);
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                result.setSuccess(false);
+            }
+        }
+        return result;
+    }
+
+    @PostMapping("/excel")
     public void getExcelReport(@RequestBody JSONObject requestBody,
                                HttpServletRequest request,
                                HttpServletResponse response) {
-        JSONArray columns=requestBody.getJSONArray("columns");
-        if(columns.isEmpty()){
-            log.error("请选择需要导出的字段");
+        //加一个参数区分是table页,还是详情页。
+        String exportType= requestBody.getString("exportType");
+        if(exportType.isEmpty()){
+            return;
         }
-        String filed= JsonResourceUtil.joinFiled(AccountReportConstants.dicMapKs,columns);
-        List<String> titles= new ArrayList<>();
-        titles.add("视频");
-        titles.add("视频名称");
-        titles.add("项目名称");
-        titles.add("上传时间");
-        titles.addAll(JsonResourceUtil.joinTitle(AccountReportConstants.dicMapKs,columns));
+        JSONArray columns = requestBody.getJSONArray("columns");
+        if (columns.isEmpty()) {
+            //默认消耗必查
+            columns.add("cost");
+        }
+        String filed = JsonResourceUtil.joinFiled(AccountReportConstants.dicMapKs, columns);
+        List<String> titles = new ArrayList<>();
         //此处增加两个元素是为了保证数据顺序
-        columns.add(0,"url");
-        columns.add(1,"materialName");
-        columns.add(2,"projectName");
-        columns.add(3,"createTime");
+        if(exportType.equals("exportDetail")){
+            titles.add(0,"客户");
+            titles.add(1,"项目名称");
+            titles.add(2,"时间");
+            titles.add(3,"消耗");
+            columns.add(0, "advertiserName");
+            columns.add(1, "projectName");
+            columns.add(2, "statDate");
+        }else{
+            titles.add(0,"唯一标识");
+            titles.add(1,"视频");
+            titles.add(2,"视频名称");
+            titles.add(3,"项目名称");
+            titles.add(4,"上传时间");
+            titles.addAll(JsonResourceUtil.joinTitle(AccountReportConstants.dicMapKs, columns));
+            columns.add(0, "signature");
+            columns.add(1, "url");
+            columns.add(2, "materialName");
+            columns.add(3, "projectName");
+            columns.add(4, "createTime");
+        }
+
         JSONArray accountIds = requestBody.getJSONArray("accountIds");
-        if(accountIds.isEmpty()){
-            accountIds=null;
+        if (accountIds.isEmpty()) {
+            accountIds = null;
         }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
+        String signature = requestBody.getString("signature");
+        String clip = requestBody.getString("clip");
+        String shot = requestBody.getString("shot");
+        String plan = requestBody.getString("plan");
         String target = requestBody.getString("target");
         String order = requestBody.getString("order");
-        List<JSONObject> excelData= ksVideoReportService.exportExcelReportBy(accountIds,startDate,endDate,filed,target,order);
-        if(excelData.isEmpty()){
+        List<JSONObject> excelData=null;
+        if(exportType.equals("exportTable")){
+            excelData = ksVideoReportService.exportExcelReportBy(accountIds, startDate, endDate, filed, target, order,clip,shot,plan);
+        }else if(exportType.equals("exportDetail")){
+            excelData = ksVideoReportService.getVideoDetailBy(accountIds,startDate,endDate,filed,signature);
+        }
+        if (null!=excelData&&excelData.isEmpty()) {
             return;
         }
-        List<List<Object>> excelList= new ArrayList<>();
-        excelData.forEach(data->{
-            List<Object> temp= new ArrayList<>();
-            columns.forEach(k->{
+        List<List<Object>> excelList = new ArrayList<>();
+        excelData.forEach(data -> {
+            List<Object> temp = new ArrayList<>();
+            columns.forEach(k -> {
                 temp.add(data.get(k.toString()));
             });
             excelList.add(temp);
         });
-        try{
+        try {
             String[] headers = titles.toArray(new String[titles.size()]);
             OutputStream os = response.getOutputStream();
             ExportExcelUtils eeu = new ExportExcelUtils();
@@ -118,9 +179,8 @@ public class KsVideoReportCtrl {
             workbook.write(os);
             os.flush();
             os.close();
-        }catch (IOException e){
+        } catch (IOException e) {
             log.error(e.getMessage());
         }
     }
-
 }

+ 3 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KsVideoReportMapper.java

@@ -8,6 +8,8 @@ import java.util.List;
 
 public interface KsVideoReportMapper {
 
-    List<JSONObject> queryVideoReportBy(@Param("accountIds") JSONArray accountIds, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("filed") String filed, @Param("target") String target, @Param("order") String order);
+    List<JSONObject> queryVideoReportBy(@Param("accountIds") JSONArray accountIds,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("filed") String filed,@Param("target") String target,@Param("order") String order,@Param("clip") String clip,@Param("shot") String shot,@Param("plan") String plan);
+
+    List<JSONObject> queryVideoDetailBy(@Param("accountIds") JSONArray accountIds,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("filed") String filed,@Param("signature") String signature);
 
 }

+ 2 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouReportDailyAccountMapper.java

@@ -1,5 +1,6 @@
 package cn.com.ctop.kuaishou.modules.report.mapper;
 
+import cn.com.ctop.common.module.vo.KuaishouReportAccountDailyDTOEntity;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccount;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouVideoInfoDTO;
@@ -46,5 +47,5 @@ public interface KuaishouReportDailyAccountMapper extends BaseMapper<KuaishouRep
 
     List<Long> getSaleProjectAccountIds(@Param("userId")String userId, @Param("yn")Integer yn);
 
-
+    List<KuaishouReportAccountDailyDTOEntity> getKuaishouProjectInfoEntity(@Param("startDate")String startDate, @Param("endDate")String endDate, @Param("projectList")List<Long> projectList, @Param("yn")Integer yn);
 }

+ 55 - 12
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KsVideoReportMapper.xml

@@ -3,20 +3,16 @@
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KsVideoReportMapper">
 
     <select id="queryVideoReportBy" resultType="com.alibaba.fastjson.JSONObject">
-        SELECT
+        SELECT * from (SELECT
         t1.signature,
         t2.url,
-        t2.cover_url AS coverUrl,
-        t2.material_name materialName,
-        (
-        SELECT
-        project_name
-        FROM
-        ctop_project t4
-        WHERE
-        t4.id = t3.project_id
-        ) AS projectName,
-        t2.create_time AS createTime,
+        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1) AS clip,
+        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1) AS shot,
+        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1) AS plan,
+        t2.cover_url as converUrl,
+        t2.material_name AS materialName,
+        (SELECT project_name FROM ctop_project t4 WHERE t4.id = t3.project_id) AS projectName,
+        t2.create_time as createTime,
         ${filed}
         FROM
         ctop_kuaishou_report_daily_material t1
@@ -34,6 +30,53 @@
         </if>
         AND t2.url!=""
         GROUP BY t1.signature
+        ) t
+        WHERE t.clip like '%${clip}%'
+        AND t.shot like '%${shot}%'
+        AND t.plan like '%${plan}%'
         ORDER BY ${target} ${order}
     </select>
+
+    <select id="queryVideoDetailBy" resultType="com.alibaba.fastjson.JSONObject">
+        SELECT
+        t1.stat_date as statDate,
+        t1.signature,
+        t2.url,
+        t2.cover_url as converUrl,
+        t2.material_name AS materialName,
+        (
+        SELECT
+        project_name
+        FROM
+        ctop_project t4
+        WHERE
+        t4.id = t3.project_id
+        ) AS projectName,
+        (
+        SELECT
+        advertiser_name
+        FROM
+        ctop_project t4
+        WHERE
+        t4.id = t3.project_id limit 1
+        ) AS advertiserName,
+        t2.create_time as createTime,
+        ${filed}
+        FROM
+        ctop_kuaishou_report_daily_material t1
+        left join ctop_material_info t2 on t1.signature=t2.code
+        LEFT JOIN ctop_user_allocation t3 ON t3.account_id=t1.account_id
+        WHERE t1.signature=#{signature}
+        AND t1.stat_date >= #{startDate}
+        AND t1.stat_date &lt;= #{endDate}
+        <if test="accountIds != null">
+            AND t1.account_id in
+            <foreach item="item" index="index" collection="accountIds"
+                     open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        AND t2.url!=""
+        GROUP BY t1.signature,t1.stat_date
+    </select>
 </mapper>

+ 82 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyAccountMapper.xml

@@ -1139,5 +1139,87 @@
             limit 50
         </if>
     </select>
+    <select id="getKuaishouProjectInfoEntity"
+            resultType="cn.com.ctop.common.module.vo.KuaishouReportAccountDailyDTOEntity">
+        select
+        concat(#{startDate}, '~' , #{endDate}) as 'statDate',
+        b.project_id as 'projectId',
+        (SELECT project_name FROM ctop_project where id = b.project_id) as 'projectName',
+        (select name from ctop_advertiser where id = b.advertiser_id) as 'advertiserName',
+        (
+        select realname from sys_user where id = (
+        select responsible_id from ctop_project where id = b.project_id
+        )
+        ) as 'responsibleName',
+        (
+        select realname from sys_user where id = (
+        select design_responsible_id from ctop_project where id = b.project_id
+        )
+        ) as 'designResponsibleName',
+        ifnull(round(sum(a.charge),3),0) as 'charge',
+        ifnull(sum(a.photo_show),0) as 'photoShow', -- 封面曝光数
+        ifnull(sum(a.photo_click),0) as 'photoClick', -- 封面点击数
+        ifnull(sum(a.aclick),0) as 'aclick', -- 素材曝光数
+        ifnull(sum(a.bclick),0) as 'bclick', -- 行为数
+        ifnull(sum(a.activation),0) as 'activation', -- 激活数
+        ifnull(sum(a.submit),0) as 'submit', -- 提交按钮点击数
+        ifnull(sum(a.event_register),0) as 'eventRegister', -- 注册数
+        ifnull(sum(event_next_day_stay),0) as 'eventNextDayStay', -- 次日留存数
+        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost', -- 激活成本
+        case when (sum(a.photo_show) is not null and sum(a.photo_show)!=0) then
+        concat(round(ifnull(sum(a.photo_click),0)/sum(a.photo_show) * 100 ,2),'%') else 0 end as 'photoClickRate',
+        case when (sum(a.aclick) is not null and sum(a.aclick)!=0) then
+        concat(round(ifnull(sum(a.bclick),0)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'bclickRate', -- 行为率
+        (case
+        when (sum(a.photo_show) is not null and sum(a.photo_show) != 0)
+        then round((ifnull(sum(a.charge),0) / sum(a.photo_show)) * 1000,2)
+        else 0
+        end
+        ) as 'impression1kCost', -- 均千次封面曝光花费
+        (case
+        when (sum(a.photo_click) is not null and sum(a.photo_click) != 0)
+        then round( ifnull(sum(a.charge),0) / sum(a.photo_click),2)
+        else 0
+        end
+        ) as 'photoClickCost', -- 平均封面点击单价
+        (CASE
+        WHEN ( sum(a.bclick) is not null and sum(a.bclick) != 0)
+        THEN round(sum(a.charge) / sum(a.bclick),2)
+        ELSE 0
+        end
+        ) as 'actionCost', -- 平均行为单价
+        ifnull(sum(a.photo_share),0) as 'photoShare', -- 分享数
+        ifnull(sum(a.photo_comment),0) as 'photoComment', -- 评论数
+        ifnull(sum(a.photo_like),0) as 'photoLike', -- 点赞数
+        ifnull(sum(a.follow),0) as 'follow', -- 新增关注数
+        ifnull(sum(a.report),0) as 'report', -- 举报数
+        ifnull(sum(a.cancel_follow),0) as 'cancelFollow', -- 取消关注数
+        ifnull(sum(a.block),0) as 'block', -- 拉黑数
+        ifnull(sum(a.negative),0) as 'nagative', -- 减少此类作品数
+        ifnull(sum(a.download_started),0) as 'downloadStarted', -- 应用下载数据-安卓下载开始数
+        ifnull(sum(a.download_completed),0) as 'downloadCompleted', -- 应用下载数据-安卓下载完成数
+        (CASE
+        WHEN ( sum(a.event_next_day_stay) is not null and sum(a.event_next_day_stay) != 0)
+        THEN round( ifnull(sum(a.charge),0) / sum(a.event_next_day_stay) ,2)
+        ELSE 0
+        end
+        ) as 'eventNextDayStayCost' -- 次日留存成本
+        from
+        ctop_kuaishou_report_daily_account a
+        left join ctop_user_allocation b
+        on a.account_id = b.account_id
+        where
+        a.stat_date &gt;= #{startDate}
+        and
+        a.stat_date &lt;= #{endDate}
+        and
+        b.project_id in
+        <foreach collection="projectList" item="item" separator=","
+                 open="(" close=")">
+            #{item}
+        </foreach>
+        group by b.project_id  order by sum(a.charge) desc
+
+    </select>
 
 </mapper>

+ 4 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/IKsVideoReportService.java

@@ -8,7 +8,9 @@ import java.util.List;
 
 public interface IKsVideoReportService {
 
-    PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, int pageSize, int pageNo);
+    PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan, int pageSize, int pageNo);
 
-    List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order);
+    List<JSONObject> getVideoDetailBy(JSONArray accountIds, String startDate, String endDate, String filed, String signature);
+
+    List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan);
 }

+ 2 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/IKuaishouReportDailyAccountService.java

@@ -1,15 +1,13 @@
 package cn.com.ctop.kuaishou.modules.report.service;
 
+import cn.com.ctop.common.module.vo.SheetInfoVo;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccount;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO;
 import cn.com.ctop.kuaishou.modules.report.entity.ProjectAccountDTO;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.github.pagehelper.PageInfo;
-import org.apache.shiro.SecurityUtils;
-import org.jeecg.common.system.vo.LoginUser;
 
-import java.util.ArrayList;
 import java.util.List;
 
 public interface IKuaishouReportDailyAccountService extends IService<KuaishouReportDailyAccount> {
@@ -30,4 +28,5 @@ public interface IKuaishouReportDailyAccountService extends IService<KuaishouRep
 
     PageInfo<KuaishouReportDailyAccountDTO> getKuaishouCreativeInfoByUnitId(List<Long> projectList, Long unitId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn);
 
+    SheetInfoVo getKuaishouSaleProjectInfoSheetVO(String startDate, String endDate, List<Long> projectList, int pageNum, int pageSize, String s, Integer yn);
 }

+ 9 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KsVideoReportServiceImpl.java

@@ -18,15 +18,20 @@ public class KsVideoReportServiceImpl implements IKsVideoReportService {
     KsVideoReportMapper ksVideoReportMapper;
 
     @Override
-    public PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order,int pageSize,int pageNo) {
+    public PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan, int pageSize, int pageNo) {
         PageHelper.startPage(pageNo,pageSize);
-        List<JSONObject> jsonObjectList=ksVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order);
+        List<JSONObject> jsonObjectList=ksVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order,clip,shot,plan);
         return new PageInfo<>(jsonObjectList);
     }
 
     @Override
-    public List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order) {
-        return ksVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order);
+    public List<JSONObject> getVideoDetailBy(JSONArray accountIds, String startDate, String endDate, String filed, String signature) {
+        return ksVideoReportMapper.queryVideoDetailBy(accountIds,startDate,endDate,filed,signature);
+    }
+
+    @Override
+    public List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan) {
+        return ksVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order,clip,shot,plan);
     }
 
 }

+ 3 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaiShouAccountReportServiceImpl.java

@@ -180,9 +180,10 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
         JSONObject jsonObject = new JSONObject();
         after.forEach((k, v) -> {
             //去除没法计算的字段
-            if (k.equals("accountId") || k.equals("authName") || v.toString().contains("%")) {
+            if (k.equals("accountId") || k.equals("authName") || v.toString().contains("%")||before.getString(k).contains("%")) {
                 jsonObject.put(k, "-");
-            } else {
+            }else {
+                System.out.println(k+"--"+after.getBigDecimal(k)+"--"+before.getBigDecimal(k));
                 jsonObject.put(k, LinkUtils.countLink(after.getBigDecimal(k)==null?zero:after.getBigDecimal(k), before.getBigDecimal(k)==null?zero:before.getBigDecimal(k)));
             }
         });

+ 28 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyAccountServiceImpl.java

@@ -1,5 +1,8 @@
 package cn.com.ctop.kuaishou.modules.report.service.impl;
 
+import cn.com.ctop.common.module.vo.ByteDanceReportAccountDailyDTOEntity;
+import cn.com.ctop.common.module.vo.KuaishouReportAccountDailyDTOEntity;
+import cn.com.ctop.common.module.vo.SheetInfoVo;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccount;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO;
 import cn.com.ctop.kuaishou.modules.report.entity.ProjectAccountDTO;
@@ -178,4 +181,29 @@ public class KuaishouReportDailyAccountServiceImpl extends ServiceImpl<KuaishouR
         return new PageInfo<>(kuaishouCreativeInfoList);
     }
 
+    @Override
+    public SheetInfoVo getKuaishouSaleProjectInfoSheetVO(String startDate, String endDate, List<Long> projectList, int pageNum, int pageSize, String s, Integer yn) {
+        SheetInfoVo vo = new SheetInfoVo<ByteDanceReportAccountDailyDTOEntity>();
+        if(projectList==null || projectList.size()==0){
+            LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+            String userId = sysUser.getId();
+            String roleCode = dailyAccountMapper.getRoleCodeByUserId(userId);
+
+            List<Long> mediaIds = new ArrayList<>();
+            mediaIds.add(2L);
+            mediaIds.add(4L);
+
+            if("admin".equals(roleCode)){
+                projectList = dailyAccountMapper.queryProjectMemberByAdmins(mediaIds);
+            }else{
+                projectList = dailyAccountMapper.queryProjectInfoBySaleId(userId,mediaIds);
+            }
+        }
+
+        List<KuaishouReportAccountDailyDTOEntity> dtos = dailyAccountMapper.getKuaishouProjectInfoEntity(startDate,endDate,projectList,yn);
+        vo.setSheetName("快手销售报表");
+        vo.setDetails(dtos);
+        return vo;
+    }
+
 }

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

@@ -468,8 +468,7 @@ public class BytedanceReportController {
      *
      * @return
      */
-    @RequestMapping(value = "/exportBytedanceSaleProjectInfo")
-    @ResponseBody
+    @PostMapping(value = "/exportBytedanceSaleProjectInfo")
     public void exportXxl(@RequestBody BytedanceInfoDTO dto,HttpServletResponse response) throws IOException {
         List<SheetInfoVo> sheets = new ArrayList<>();
         if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
@@ -482,9 +481,7 @@ public class BytedanceReportController {
             dto.setEndDate(dateString);
         }
 
-        if(dto.getPageSize() == 0 ){
-            dto.setPageSize(1000000000);
-        }
+        dto.setPageSize(1000000000);
         //查询总的消耗信息
         SheetInfoVo totalSheetVo = bytedanceAccountReportService.getBytedanceSaleProjectInfoSheetVO(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(),dto.getPageNum(),dto.getPageSize(),dto.getSort(), dto.getYn());
         OutputStream outputStream = response.getOutputStream();

+ 90 - 31
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceVideoReportCtrl.java

@@ -46,18 +46,21 @@ public class BytedanceVideoReportCtrl {
             JSONArray accountIds = requestBody.getJSONArray("accountIds");
             String startDate = requestBody.getString("startDate");
             String endDate = requestBody.getString("endDate");
+            String clip = requestBody.getString("clip");
+            String shot = requestBody.getString("shot");
+            String plan = requestBody.getString("plan");
             String target = requestBody.getString("target");
             String order = requestBody.getString("order");
-            int pageSize= requestBody.getInteger("pageSize");
-            int pageNo= requestBody.getInteger("pageNo");
+            int pageSize = requestBody.getInteger("pageSize");
+            int pageNo = requestBody.getInteger("pageNo");
 
             String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.dicMapByVideo);
 
             try {
-                if(accountIds.isEmpty()){
-                    accountIds=null;
+                if (accountIds.isEmpty()) {
+                    accountIds = null;
                 }
-                PageInfo<JSONObject> listData = bytedanceVideoReportService.getVideoReportBy(accountIds, startDate, endDate, filedAll, target, order,pageSize,pageNo);
+                PageInfo<JSONObject> listData = bytedanceVideoReportService.getVideoReportBy(accountIds, startDate, endDate, filedAll, target, order, clip, shot,plan,pageSize, pageNo);
                 result.setResult(listData);
                 result.setSuccess(true);
             } catch (Exception e) {
@@ -68,47 +71,104 @@ public class BytedanceVideoReportCtrl {
         return result;
     }
 
-    @PostMapping("/report/excel")
+    @PostMapping("/detail")
+    public Result<List<JSONObject>> getReportDetail(@RequestBody JSONObject requestBody) {
+        Result<List<JSONObject>> result = new Result<>();
+        if (requestBody.isEmpty()) {
+            log.error("request body is empty");
+            result.setSuccess(false);
+        } else {
+
+            JSONArray accountIds = requestBody.getJSONArray("accountIds");
+            String signature = requestBody.getString("signature");
+            String startDate = requestBody.getString("startDate");
+            String endDate = requestBody.getString("endDate");
+
+            String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.dicMapByVideo);
+
+            try {
+                if (accountIds.isEmpty()) {
+                    accountIds = null;
+                }
+                List<JSONObject> listData = bytedanceVideoReportService.getVideoDetailBy(accountIds, startDate, endDate, filedAll,signature);
+                result.setResult(listData);
+                result.setSuccess(true);
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                result.setSuccess(false);
+            }
+        }
+        return result;
+    }
+
+    @PostMapping("/excel")
     public void getExcelReport(@RequestBody JSONObject requestBody,
                                HttpServletRequest request,
                                HttpServletResponse response) {
-        JSONArray columns=requestBody.getJSONArray("columns");
-        if(columns.isEmpty()){
-            log.error("请选择需要导出的字段");
+        //加一个参数区分是table页,还是详情页。
+        String exportType= requestBody.getString("exportType");
+        if(exportType.isEmpty()){
+            return;
         }
-        String filed= JsonResourceUtil.joinFiled(AccountReportConstants.dicMapByVideo,columns);
-        List<String> titles= new ArrayList<>();
-        titles.add("视频");
-        titles.add("视频名称");
-        titles.add("项目名称");
-        titles.add("上传时间");
-        titles.addAll(JsonResourceUtil.joinTitle(AccountReportConstants.dicMapByVideo,columns));
+        JSONArray columns = requestBody.getJSONArray("columns");
+        if (columns.isEmpty()) {
+            //默认消耗必查
+            columns.add("cost");
+        }
+        String filed = JsonResourceUtil.joinFiled(AccountReportConstants.dicMapByVideo, columns);
+        List<String> titles = new ArrayList<>();
         //此处增加两个元素是为了保证数据顺序
-        columns.add(0,"url");
-        columns.add(1,"materialName");
-        columns.add(2,"projectName");
-        columns.add(3,"createTime");
+        if(exportType.equals("exportDetail")){
+            titles.add(0,"客户");
+            titles.add(1,"项目名称");
+            titles.add(2,"时间");
+            titles.add(3,"消耗");
+            columns.add(0, "advertiserName");
+            columns.add(1, "projectName");
+            columns.add(2, "statDate");
+        }else{
+            titles.add(0,"唯一标识");
+            titles.add(1,"视频");
+            titles.add(2,"视频名称");
+            titles.add(3,"项目名称");
+            titles.add(4,"上传时间");
+            columns.add(0, "signature");
+            columns.add(1, "url");
+            columns.add(2, "materialName");
+            columns.add(3, "projectName");
+            columns.add(4, "createTime");
+        }
+
         JSONArray accountIds = requestBody.getJSONArray("accountIds");
-        if(accountIds.isEmpty()){
-            accountIds=null;
+        if (accountIds.isEmpty()) {
+            accountIds = null;
         }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
+        String signature = requestBody.getString("signature");
+        String clip = requestBody.getString("clip");
+        String shot = requestBody.getString("shot");
+        String plan = requestBody.getString("plan");
         String target = requestBody.getString("target");
         String order = requestBody.getString("order");
-        List<JSONObject> excelData= bytedanceVideoReportService.exportExcelReportBy(accountIds,startDate,endDate,filed,target,order);
-        if(excelData.isEmpty()){
+        List<JSONObject> excelData=null;
+        if(exportType.equals("exportTable")){
+            excelData = bytedanceVideoReportService.exportExcelReportBy(accountIds, startDate, endDate, filed, target, order,clip,shot,plan);
+        }else if(exportType.equals("exportDetail")){
+            excelData = bytedanceVideoReportService.getVideoDetailBy(accountIds,startDate,endDate,filed,signature);
+        }
+        if (null!=excelData&&excelData.isEmpty()) {
             return;
         }
-        List<List<Object>> excelList= new ArrayList<>();
-        excelData.forEach(data->{
-            List<Object> temp= new ArrayList<>();
-            columns.forEach(k->{
+        List<List<Object>> excelList = new ArrayList<>();
+        excelData.forEach(data -> {
+            List<Object> temp = new ArrayList<>();
+            columns.forEach(k -> {
                 temp.add(data.get(k.toString()));
             });
             excelList.add(temp);
         });
-        try{
+        try {
             String[] headers = titles.toArray(new String[titles.size()]);
             OutputStream os = response.getOutputStream();
             ExportExcelUtils eeu = new ExportExcelUtils();
@@ -118,9 +178,8 @@ public class BytedanceVideoReportCtrl {
             workbook.write(os);
             os.flush();
             os.close();
-        }catch (IOException e){
+        } catch (IOException e) {
             log.error(e.getMessage());
         }
     }
-
 }

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

@@ -8,6 +8,7 @@ import java.util.List;
 
 public interface BytedanceVideoReportMapper {
 
-    List<JSONObject> queryVideoReportBy(@Param("accountIds") JSONArray accountIds,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("filed") String filed,@Param("target") String target,@Param("order") String order);
+    List<JSONObject> queryVideoReportBy(@Param("accountIds") JSONArray accountIds,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("filed") String filed,@Param("target") String target,@Param("order") String order,@Param("clip") String clip,@Param("shot") String shot,@Param("plan") String plan);
 
+    List<JSONObject> queryVideoDetailBy(@Param("accountIds") JSONArray accountIds,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("filed") String filed,@Param("signature") String signature);
 }

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

@@ -675,202 +675,194 @@
         b.advertiser_id as advertiserId,
         b.advertiser_name as advertiserName,
         a.stat_datetime as statDatetime,
-        sum(a.cost) as cost,  -- 消耗
+        sum(a.cost) as cost,
         d.signature as signature,
         d.video_url as videoUrl,
         e.url as url,
         '-' as materialDesc,
         1 as appType,
-        sum(a.click) as click,   -- 点击数
+        sum(a.click) as click,
         case
         when sum(a.total_play) != 0
         then sum(a.play25_feed_break)/sum(a.total_play)
-        else 0 end as play25FeedBreakRate,  -- 25%进度播放率
+        else 0 end as play25FeedBreakRate,
 
         case
         when sum(a.total_play) != 0
         then sum(a.play_over)/sum(a.total_play)
-        else 0 end as playOverRate,  -- 整体完播率
-
+        else 0 end as playOverRate,
         case
         when sum(a.click) != 0
         then sum(a.convert_material)/sum(a.click)
-        else 0 end as convertRate,  -- 转化率  转化数/点击数*100% !
-        sum(a.active) as active, -- 应用下载-激活
-        sum(a.download_finish) as downloadFinish, -- 应用下载-安卓下载完成
-        sum(a.download_start) as downloadStart, -- 应用下载-安卓下载开始
-        sum(a.install_finish) as installFinish, -- 应用下载-安卓安装完成
-        sum(a.register) as register, -- 应用下载-注册
-        sum(a.pay_count) as payCount, -- 应用下载-付费数
-        sum(a.in_app_uv) as inAppUv, -- 应用下载-到达uv
-        sum(a.in_app_detail_uv) as inAppDetailUv, -- 应用下载-详情页到站uv
-        sum(a.in_app_cart) as inAppCart, -- 应用下载-加入购物车
-        sum(a.in_app_order) as inAppOrder, -- 应用下载-提交订单
-        sum(a.in_app_pay) as inAppPay, -- 应用下载-付费
-        sum(a.phone) as phone, -- 落地页-电话拨打数
-        sum(a.form) as form, --  表单提交数
-        sum(a.map_search) as mapSearch, -- 落地页-地图搜索
-        sum(a.button) as button, -- 落地页-按钮button
-        sum(a.view_material) as viewMaterial, -- 落地页-关键页面浏览
-        sum(a.qq) as qq, -- 落地页-QQ咨询数
-        sum(a.lottery) as lottery, -- 落地页-抽奖数
-        sum(a.vote) as vote, -- 落地页-投票
-        sum(a.redirect) as redirect, -- 落地页-页面跳转
-        sum(a.shopping) as shopping, -- 落地页-商品购买
-        sum(a.consult) as consult, -- 落地页-在线咨询
-        sum(a.wechat) as wechat, -- 落地页-微信
-        sum(a.phone_confirm) as phoneConfirm, -- 落地页-智能电话确认拨打
-        sum(a.phone_connect) as phoneConnect, -- 落地页-智能电话确认接通
-        sum(a.consult_effective) as consultEffective, -- 落地页-智能电话有效咨询
-        sum(a.total_play) as totalPlay, -- 视频-总播放
-        sum(a.valid_play) as validPlay, -- 视频-有效播放
-        sum(a.wifi_play) as wifiPlay, -- 视频-wifi播放
-        sum(a.play25_feed_break) as play25FeedBreak, -- 视频-播放25%进度总数
-        sum(a.play50_feed_break) as play50FeedBreak, -- 视频-播放50%进度总数
-        sum(a.play75_feed_break) as play75FeedBreak, -- 视频-播放75%进度总数
-        sum(a.play100_feed_break) as play100FeedBreak, -- 视频-播放100%进度总数
-        sum(a.advanced_creative_phone_click) as advancedCreativePhoneClick, -- 附加创意-电话按钮
-        sum(a.advanced_creative_counsel_click) as advancedCreativeCounselClick, -- 附加创意-在线咨询
-        sum(a.advanced_creative_form_click) as advancedCreativeFormClick, -- 附加创意-表单提交
-        sum(a.share_material) as shareMaterial, -- 互动数据-分享数
-        sum(a.comment_material) as commentMaterial, -- 互动数据-评论数
-        sum(a.follow) as follow, -- 互动数据-新增关注数
-        sum(a.home_visited) as homeVisited, -- 互动数据-主页访问量
-        sum(a.ies_challenge_click) as iesChallengeClick, -- 互动数据-挑战赛查看数
-        sum(a.ies_music_click) as iesMusicClick, -- 互动数据-音乐查看数
-        sum(a.next_day_open) as nextDayOpen, -- 次留数
+        else 0 end as convertRate,
+        sum(a.active) as active,
+        sum(a.download_finish) as downloadFinish,
+        sum(a.download_start) as downloadStart,
+        sum(a.install_finish) as installFinish,
+        sum(a.register) as register,
+        sum(a.pay_count) as payCount,
+        sum(a.in_app_uv) as inAppUv,
+        sum(a.in_app_detail_uv) as inAppDetailUv,
+        sum(a.in_app_cart) as inAppCart,
+        sum(a.in_app_order) as inAppOrder,
+        sum(a.in_app_pay) as inAppPay,
+        sum(a.phone) as phone,
+        sum(a.form) as form,
+        sum(a.map_search) as mapSearch,
+        sum(a.button) as button,
+        sum(a.view_material) as viewMaterial,
+        sum(a.qq) as qq,
+        sum(a.lottery) as lottery,
+        sum(a.vote) as vote,
+        sum(a.redirect) as redirect,
+        sum(a.shopping) as shopping,
+        sum(a.consult) as consult,
+        sum(a.wechat) as wechat,
+        sum(a.phone_confirm) as phoneConfirm,
+        sum(a.phone_connect) as phoneConnect,
+        sum(a.consult_effective) as consultEffective,
+        sum(a.total_play) as totalPlay,
+        sum(a.valid_play) as validPlay,
+        sum(a.wifi_play) as wifiPlay,
+        sum(a.play25_feed_break) as play25FeedBreak,
+        sum(a.play50_feed_break) as play50FeedBreak,
+        sum(a.play75_feed_break) as play75FeedBreak,
+        sum(a.play100_feed_break) as play100FeedBreak,
+        sum(a.advanced_creative_phone_click) as advancedCreativePhoneClick,
+        sum(a.advanced_creative_counsel_click) as advancedCreativeCounselClick,
+        sum(a.advanced_creative_form_click) as advancedCreativeFormClick,
+        sum(a.share_material) as shareMaterial,
+        sum(a.comment_material) as commentMaterial,
+        sum(a.follow) as follow,
+        sum(a.home_visited) as homeVisited,
+        sum(a.ies_challenge_click) as iesChallengeClick,
+        sum(a.ies_music_click) as iesMusicClick,
+        sum(a.next_day_open) as nextDayOpen,
         case
         when sum(a.active) != 0
         then sum(a.next_day_open)/sum(a.active)
-        else 0 end as nextDayOpenRate, -- 次留率 = 次留数/激活数
+        else 0 end as nextDayOpenRate,
 
         case
         when sum(a.next_day_open) != 0
         then sum(a.cost)/sum(a.next_day_open)
-        else 0 end as nextDayOpenCost, -- 次留成本 = 消耗/次留数
+        else 0 end as nextDayOpenCost,
 
         case when sum(a.pay_count) != 0
         then sum(a.cost)/sum(a.pay_count)
         else 0 end
-        as activePayCost, -- 应用下载广告数据-付费成本 = 消耗/付费次数
+        as activePayCost,
 
-        sum(a.active_pay_amount) as activePayAmount, -- 应用下载广告数据-付费次数
+        sum(a.active_pay_amount) as activePayAmount,
 
         case
         when sum(a.valid_play) != 0
         then sum(a.cost)/sum(a.valid_play)
-        else 0 end validPlayCost, -- 视频数据-有效播放成本  计算公式:总花费/有效播放数,当天数据可能会有波动,次日早8点后稳定。
-        sum(a.advanced_creative_coupon_addition) as advancedCreativeCouponAddition, -- 附加创意-附加创意卡券领取
-        sum(a.convert_material) as convertMaterial, -- 转化数据-转化数
+        else 0 end validPlayCost,
+        sum(a.advanced_creative_coupon_addition) as advancedCreativeCouponAddition,
+        sum(a.convert_material) as convertMaterial,
 
         case
         when sum(a.active_pay_amount) != 0
         then sum(a.cost)/sum(a.active_pay_amount)
-        else 0 end as activePayCost, -- 应用下载广告数据-付费成本 = 消耗/付费次数
-        sum(a.download) as download, -- 落地页转化数据-下载开始
-
+        else 0 end as activePayCost,
+        sum(a.download) as download,
         case
         when sum(a.click) != 0
         then sum(a.cost) / sum(a.click)
-        else 0 end                           as cpc,                            -- 平均点击单价
-        sum(a.location_click) as locationClick, -- 互动数据-POI点击数
+        else 0 end                           as cpc,
+        sum(a.location_click) as locationClick,
 
         case
         when sum(a.show_material) != 0
         then sum(a.click)/sum(a.show_material)
-        else 0 end as ctr, -- 展现数据-点击率   广告被点击的次数占展示次数的百分比。计算方法:点击数/展示数*100%
+        else 0 end as ctr,
 
         case
         when sum(a.show_material) != 0
         then sum(a.cost)/sum(a.show_material)*1000
-        else 0 end cpm, -- 平均千次展现费用  广告平均每一千次展现所付出的费用,计算公式是:总花费/展示数*1000。
-        sum(a.wifi_play_rate) as wifiPlayRate, -- 视频数据-WiFi播放占比
-        sum(a.like_material) as likeMaterial, -- 互动数据-点赞数
+        else 0 end cpm,
+        sum(a.wifi_play_rate) as wifiPlayRate,
+        sum(a.like_material) as likeMaterial,
 
         case
         when sum(a.active) != 0
         then sum(a.cost)/sum(a.active)
-        else 0 end activeCost, -- 应用下载广告数据-激活成本  计算方式:总花费/激活数。
+        else 0 end activeCost,
 
         case
         when sum(a.game_addiction) != 0
         then sum(a.cost)/sum(a.game_addiction)
-        else 0 end as gameAddictionCost, -- 应用下载广告数据-关键行为成本  广告主为每个有APP内关键行为的用户所付出的成本,计算公式是总花费/关键行为数。当天数据可能会有波动,次日早8点后稳定。
-        sum(a.game_addiction) as gameAddiction, -- 应用下载广告数据-关键行为数
+        else 0 end as gameAddictionCost,
+        sum(a.game_addiction) as gameAddiction,
 
         case
         when sum(a.click) != 0
         then sum(a.active)/sum(a.click)
-        else 0 end as activeRate, -- 应用下载广告数据-激活率   计算方式:激活数/点击数*100%
+        else 0 end as activeRate,
 
         case
         when sum(a.active) != 0
         then sum(a.game_addiction)/sum(a.active)
-        else 0 end gameAddictionRate, -- 应用下载广告数据-关键行为率  关键行为用户占激活用户的比例
-
+        else 0 end gameAddictionRate,
         case
         when sum(a.active) != 0
         then sum(a.register)/sum(a.active)
-        else 0 end as activeRegisterRate, -- 应用下载广告数据-注册率   注册用户占激活用户的比例
-
+        else 0 end as activeRegisterRate,
 
         case
         when sum(a.download_finish) != 0
         then sum(a.cost)/sum(a.download_finish)
-        else 0 end as downloadFinishCost, -- 应用下载广告数据-安卓下载完成成本 计算方式:总花费/安卓下载完成数。
+        else 0 end as downloadFinishCost,
 
 
         case
         when sum(a.register) != 0
         then sum(a.cost)/sum(a.register)
-        else 0 end as activeRegisterCost, -- 应用下载广告数据-注册成本  总花费/注册数,当天数据可能会有波动,次日早8点后稳定。
-        sum(a.show_material) as showMaterial, -- 展现数据-展示数
+        else 0 end as activeRegisterCost,
+        sum(a.show_material) as showMaterial,
 
         case
         when sum(a.download_start) != 0
         then sum(a.download_finish)/sum(a.download_start)
-        else 0 end as downloadFinishRate, -- 应用下载广告数据-安卓下载完成率  计算方式:安卓下载完成数/安卓下载开始数
+        else 0 end as downloadFinishRate,
 
         case
         when sum(a.download_finish) != 0
         then sum(a.install_finish)/sum(a.download_finish)
-        else 0 end as installFinishRate, -- 应用下载广告数据-安卓安装完成率  计算方式:安卓安装完成数/安卓下载完成数
-        sum(a.coupon) as coupon, -- 落地页转化数据-建站卡券领取
-        sum(a.coupon_single_page) as couponSinglePage, -- 落地页转化数据-卡券页领取
-        sum(a.play_over) as playOver, -- 完播数
+        else 0 end as installFinishRate,
+        sum(a.coupon) as coupon,
+        sum(a.coupon_single_page) as couponSinglePage,
+        sum(a.play_over) as playOver,
 
         case
         when sum(a.download_start) != 0
         then sum(a.cost)/sum(a.download_start)
-        else 0 end as downloadStartCost, -- 应用下载广告数据-安卓下载开始成本  计算方法:总花费/安卓下载开始数。
-        sum(a.message) as message, -- 落地页转化数据-短信咨询  用户点击短信咨询的次数
-        <!-- sum(a.play_duration) as playDuration, --> --
-
+        else 0 end as downloadStartCost,
+        sum(a.message) as message,
         case
         when sum(a.show_material) != 0
         then sum(a.valid_play)/sum(a.show_material)
-        else 0 end as validPlayRate, -- 视频数据-有效播放率  有效播放数/展示数
+        else 0 end as validPlayRate,
 
         case
         when sum(a.valid_play) != 0
         then sum(a.average_play_time_per_play*a.valid_play)/sum(a.valid_play)
-        else 0 end as averagePlayTimePerPlay,         -- 视频数据-平均单次播放时长
-
+        else 0 end as averagePlayTimePerPlay,
         case
         when sum(a.convert_material) != 0
         then sum(a.cost)/sum(a.convert_material)
-        else 0 end as convertCost, --  转化数据-转化成本=总花费/转化数
-        <!--  sum(a.convert_show_rate) as convert_show_rate, --> --
+        else 0 end as convertCost,
 
         case
         when sum(a.install_finish) != 0
         then sum(a.cost)/sum(a.install_finish)
-        else 0 end as installFinishCost, --  应用下载广告数据-安卓安装完成成本  计算方式:总花费/安卓安装完成数
+        else 0 end as installFinishCost,
 
         case
         when sum(a.click) != 0
         then sum(a.download_start)/sum(a.click)
-        else 0 end as downloadStartRate, --  应用下载广告数据-安卓下载开始率  计算方法:安卓下载开始数/点击数
+        else 0 end as downloadStartRate,
     </sql>
 
     <select id="videoInfoList" resultType="cn.com.ctop.toutiao.modules.report.entity.ByteDanceVideoReportDaily">

+ 52 - 9
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceVideoReportMapper.xml

@@ -3,19 +3,15 @@
 <mapper namespace="cn.com.ctop.toutiao.modules.report.mapper.BytedanceVideoReportMapper">
 
     <select id="queryVideoReportBy" resultType="com.alibaba.fastjson.JSONObject">
-        SELECT
+        SELECT * from (SELECT
         t1.signature,
         t2.url,
+        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1) AS clip,
+        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1) AS shot,
+        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1) AS plan,
         t2.cover_url as converUrl,
         t2.material_name AS materialName,
-        (
-        SELECT
-        project_name
-        FROM
-        ctop_project t4
-        WHERE
-        t4.id = t3.project_id
-        ) AS projectName,
+        (SELECT project_name FROM ctop_project t4 WHERE t4.id = t3.project_id) AS projectName,
         t2.create_time as createTime,
         ${filed}
         FROM
@@ -34,6 +30,53 @@
         </if>
         AND t2.url!=""
         GROUP BY t1.signature
+        ) t
+        WHERE t.clip like '%${clip}%'
+        AND t.shot like '%${shot}%'
+        AND t.plan like '%${plan}%'
         ORDER BY ${target} ${order}
     </select>
+
+    <select id="queryVideoDetailBy" resultType="com.alibaba.fastjson.JSONObject">
+        SELECT
+        t1.stat_datetime as statDate,
+        t1.signature,
+        t2.url,
+        t2.cover_url as converUrl,
+        t2.material_name AS materialName,
+        (
+        SELECT
+        project_name
+        FROM
+        ctop_project t4
+        WHERE
+        t4.id = t3.project_id
+        ) AS projectName,
+        (
+        SELECT
+        advertiser_name
+        FROM
+        ctop_project t4
+        WHERE
+        t4.id = t3.project_id limit 1
+        ) AS advertiserName,
+        t2.create_time as createTime,
+        ${filed}
+        FROM
+        ctop_bytedance_video_report_daily t1
+        left join ctop_material_info t2 on t1.signature=t2.code
+        LEFT JOIN ctop_user_allocation t3 ON t3.account_id=t1.account_id
+        WHERE t1.signature=#{signature}
+        AND t1.stat_datetime >= #{startDate}
+        AND t1.stat_datetime &lt;= #{endDate}
+        <if test="accountIds != null">
+            AND t1.account_id in
+            <foreach item="item" index="index" collection="accountIds"
+                     open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        AND t2.url!=""
+        GROUP BY t1.signature,t1.stat_datetime
+    </select>
 </mapper>

+ 4 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceVideoReportService.java

@@ -8,7 +8,9 @@ import java.util.List;
 
 public interface IBytedanceVideoReportService {
 
-    PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order,int pageSize,int pageNo);
+    PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan, int pageSize, int pageNo);
 
-    List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order);
+    List<JSONObject> getVideoDetailBy(JSONArray accountIds, String startDate, String endDate, String filed, String signature);
+
+    List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan);
 }

+ 1 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceAccountReportServiceImpl.java

@@ -187,7 +187,7 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
         JSONObject jsonObject = new JSONObject();
         after.forEach((k, v) -> {
             //去除没法计算的字段
-            if (k.equals("accountId") || k.equals("authName") || v.toString().contains("%")) {
+            if (k.equals("accountId") || k.equals("authName") || v.toString().contains("%")||before.getString(k).contains("%")) {
                 jsonObject.put(k, "-");
             } else {
                 jsonObject.put(k, LinkUtils.countLink(after.getBigDecimal(k)==null?zero:after.getBigDecimal(k), before.getBigDecimal(k)==null?zero:before.getBigDecimal(k)));
@@ -228,7 +228,6 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
         if(projectList==null || projectList.size()==0){
             LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
             String userId = sysUser.getId();
-            //String userId = "388e787edd294ecfb9243fe176a3ae56";
             String roleCode = bytedanceAccountReportMapper.getRoleCodeByUserId(userId);
 
             List<Long> mediaIds = new ArrayList<>();

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

@@ -18,15 +18,20 @@ public class BytedanceVideoReportServiceImpl implements IBytedanceVideoReportSer
     BytedanceVideoReportMapper bytedanceVideoReportMapper;
 
     @Override
-    public PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order,int pageSize,int pageNo) {
+    public PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan, int pageSize, int pageNo) {
         PageHelper.startPage(pageNo,pageSize);
-        List<JSONObject> jsonObjectList=bytedanceVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order);
+        List<JSONObject> jsonObjectList=bytedanceVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order,clip,shot,plan);
         return new PageInfo<>(jsonObjectList);
     }
 
     @Override
-    public List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order) {
-        return bytedanceVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order);
+    public List<JSONObject> getVideoDetailBy(JSONArray accountIds, String startDate, String endDate, String filed, String signature) {
+        return bytedanceVideoReportMapper.queryVideoDetailBy(accountIds,startDate,endDate,filed,signature);
+    }
+
+    @Override
+    public List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan) {
+        return bytedanceVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order,clip,shot,plan);
     }
 
 }