Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/test' into test

# Conflicts:
#	module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java
#	module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java
huangxuechao 4 anni fa
parent
commit
834c74e61e
22 ha cambiato i file con 195 aggiunte e 114 eliminazioni
  1. 5 0
      jeecg-boot-module-system/pom.xml
  2. 9 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java
  3. 7 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectMemberController.java
  4. 1 1
      jeecg-boot-module-system/src/main/resources/application-test.yml
  5. 0 1
      jeecg-boot-module-system/src/main/resources/application.yml
  6. BIN
      jeecg-boot-module-system/src/main/resources/lib/opencv-4.2.0.jar
  7. 0 1
      jeecg-boot-module-system/src/main/resources/static/demo1.html
  8. 42 5
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  9. 2 13
      module-common/pom.xml
  10. BIN
      module-common/src/main/resources/lib/jave-1.0.jar
  11. 2 0
      module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceMaterialsLoadJob.java
  12. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouGroupTemplateMapper.java
  13. 87 50
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml
  14. 0 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml
  15. 2 2
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouGroupTemplateServiceImpl.java
  16. 0 9
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsVideoReportCtrl.java
  17. 6 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/mapper/BytedanceImageInfoMapper.java
  18. 22 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/mapper/xml/BytedanceImageInfoMapper.xml
  19. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/IBytedanceImageInfoService.java
  20. 6 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/BytedanceImageInfoServiceImpl.java
  21. 0 3
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/operation/util/GetChangeDateUtil.java
  22. 0 17
      pom.xml

+ 5 - 0
jeecg-boot-module-system/pom.xml

@@ -161,6 +161,8 @@
             <groupId>cn.com.ctop</groupId>
             <artifactId>opencv</artifactId>
             <version>4.2.0</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/src/main/resources/lib/opencv-4.2.0.jar</systemPath>
         </dependency>
         <dependency>
             <groupId>com.github.pagehelper</groupId>
@@ -208,6 +210,9 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
             </plugin>
         </plugins>
         <resources>

+ 9 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java

@@ -187,7 +187,9 @@ public class CallbackController {
                     userAllocation.setSystemType(systemType);
                     // 获取快手昵称
                     userAllocation.setAuthName((String) advertiseBaseInfoMap.get("userName"));
-                    userAllocation.setAuthBeginTime(authBeginTime);
+                    if(null!=authBeginTime&&!authBeginTime.trim().equals("")){
+                        userAllocation.setAuthBeginTime(authBeginTime);
+                    }
                     userAllocation.setMediaId(mediaId);
                     userAllocation.setAccountId(accountId);
                     userAllocation.setProjectId(projectId);
@@ -343,7 +345,9 @@ public class CallbackController {
                             userAllocation.setProjectId(projectId);
                             userAllocation.setSystemType(systemType);
                             userAllocation.setAuthName((String) advertiserDataMap.get("name"));
-                            userAllocation.setAuthBeginTime(authBeginTime);
+                            if(null!=authBeginTime&&!authBeginTime.trim().equals("")){
+                                userAllocation.setAuthBeginTime(authBeginTime);
+                            }
                             userAllocation.setAdvertiserId(advertiserId);
                             userAllocation.setWarningProportion(warningProportion);
                             userAllocation.setWarningAmount(warningAmount);
@@ -396,7 +400,9 @@ public class CallbackController {
                     userAllocation.setProjectId(projectId);
                     userAllocation.setSystemType(systemType);
                     userAllocation.setAuthName((String) advertiserDataMap.get("name"));
-                    userAllocation.setAuthBeginTime(authBeginTime);
+                    if(null!=authBeginTime&&!authBeginTime.trim().equals("")){
+                        userAllocation.setAuthBeginTime(authBeginTime);
+                    }
                     userAllocation.setAdvertiserId(advertiserId);
                     userAllocation.setWarningProportion(warningProportion);
                     userAllocation.setWarningAmount(warningAmount);

+ 7 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectMemberController.java

@@ -323,18 +323,21 @@ public class ProjectMemberController {
             if (Check.isNull(projectId)) {
                 throw new Exception("请选择项目");
             }
-            String projectName = jsonObject.getString("projectName");
+            Project project = projectService.getById(projectId);
+            if(Check.isNull(project)){
+                throw new Exception("项目不存在");
+            }
             JSONArray memberArr = jsonObject.getJSONArray("memberArr");
             if (Check.isNull(memberArr)) {
                 throw new Exception("请选择项目成员");
             }
             for (int i = 0; i < memberArr.size(); i++) {
-                String userId = memberArr.get(i).toString();
+                String userId = memberArr.getString(i);
                 if (!Check.isNull(userId)) {
                     QueryWrapper<ProjectMember> queryWrapper = new QueryWrapper<>();
                     queryWrapper.eq("user_id", userId);
                     queryWrapper.eq("project_id", projectId);
-                    ProjectMember selectMember = (ProjectMember) projectMemberService.getOne(queryWrapper);
+                    ProjectMember selectMember = projectMemberService.getOne(queryWrapper);
                     if (!Check.isNull(selectMember)) {
                         continue;
                     }
@@ -344,7 +347,7 @@ public class ProjectMemberController {
                         member.setRoleCode(roleCode);
                     }
                     member.setProjectId(projectId);
-                    member.setProjectName(projectName);
+                    member.setProjectName(project.getProjectName());
                     member.setUserId(userId);
                     SysUser sysUser = sysUserService.getById(userId);
                     if (!Check.isNull(sysUser)) {

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

@@ -118,7 +118,7 @@ spring:
         max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
         min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
       shutdown-timeout: 100ms
-    password:
+    password: hcst@2020
     port: 6379
 #mybatis plus 设置
 mybatis-plus:

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

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

BIN
jeecg-boot-module-system/src/main/resources/lib/opencv-4.2.0.jar


+ 0 - 1
jeecg-boot-module-system/src/main/resources/static/demo1.html

@@ -1 +0,0 @@
-demo1

+ 42 - 5
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -5,7 +5,9 @@ import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.IBindAccountLoginService;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouReportDailyMaterialService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
+import cn.com.ctop.kuaishou.modules.material.service.IEtlKuaishouVideoInfoService;
 import cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouAccountMaterialReportDaily;
 import cn.com.ctop.kuaishou.modules.report.mapper.EtlKuaishouAccountMaterialReportDailyMapper;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyImageService;
@@ -70,7 +72,7 @@ public class SampleTest {
     private IBytedanceCheckReportTaskInfoService checkReportTaskInfoService;
     @Autowired
     private IEtlBytedanceReportVideoDailyService etlBytedanceReportVideoDailyService;
-    static ExecutorService executorService = null;
+    static ExecutorService executorService = Executors.newFixedThreadPool(10);
     static CountDownLatch countDownLatch = null;
     @Autowired
     private IBytedanceReportService bytedanceReportService;
@@ -230,9 +232,44 @@ public class SampleTest {
     }
 
     @Test
-    public void testfreshBytedanceUrl(){
-        etlReportBytedanceVideoService.etlBytedanceVideoClipIdJob();
-        etlReportBytedanceVideoService.etlBytedanceVideoPlanInfoJob();
-        etlReportBytedanceVideoService.etlBytedanceVideoShotInfoJob();
+    public void loadBkData(){
+        Date startDate = DateUtils.addDay(new Date(),-60);
+        for(int i=0;i<=60;i++){
+            Date getDate = DateUtils.addDay(startDate,i);
+            bytedanceVideoEtlInfoService.etlBytedanceVideoInfo(getDate);
+        }
+    }
+
+    @Autowired
+    private IEtlKuaishouVideoInfoService etlKuaishouVideoInfo;
+    @Test
+    public void loadkuaishouVideoData(){
+        String startDate = "2021-05-07";
+        for(int i=0;i<=60;i++){
+            String getDate = DateUtils.formatDate(DateUtils.addDay(startDate,i));
+            etlKuaishouVideoInfo.etlKuaishouVideoInfo(getDate);
+        }
     }
+
+    @Autowired
+    private IKuaiShouReportDailyMaterialService kuaiShouReportDailyMaterialService;
+    @Test
+    public void loadKuaishouMatData() throws InterruptedException {
+        String startDate = "2021-06-18";
+        String endDate = "2021-06-24";
+        //1:查询当日数据
+        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
+        countDownLatch = new CountDownLatch(tokens.size());
+        tokens.forEach(token -> executorService.submit(() -> {
+            try {
+                kuaiShouReportDailyMaterialService.getMaterialReportByAccountIdAndStatDate(token.getAccountId(), token.getAccessToken(), startDate, endDate, "DAILY", 1);
+            }catch (Exception e){
+            }finally {
+                countDownLatch.countDown();
+            }
+        }));
+        countDownLatch.await();
+        System.out.println("数据获取完成");
+    }
+
 }

+ 2 - 13
module-common/pom.xml

@@ -29,6 +29,8 @@
             <groupId>thirtpart</groupId>
             <artifactId>jave</artifactId>
             <version>1.0</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/src/main/resources/lib/jave-1.0.jar</systemPath>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
@@ -106,19 +108,6 @@
 
     <build>
         <resources>
-            <resource>
-                <directory>lib</directory>
-                <targetPath>BOOT-INF/lib/</targetPath>
-                <includes>
-                    <include>**/*.jar</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-                <targetPath>BOOT-INF/classes/</targetPath>
-            </resource>
-
-
             <!-- 解决MyBatis配置文件引入问题 -->
             <resource>
                 <directory>src/main/java</directory>

BIN
module-common/src/main/resources/lib/jave-1.0.jar


+ 2 - 0
module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceMaterialsLoadJob.java

@@ -53,7 +53,9 @@ public class BytedanceMaterialsLoadJob {
         } catch (InterruptedException e) {
             e.printStackTrace();
         }
+        //修改视频类型
         videoInfoService.updateMaterialType();
+        //修改图片类型
         imageInfoService.updateType();
         XxlJobHelper.log("物料数据同步完成");
     }

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouGroupTemplateMapper.java

@@ -16,7 +16,7 @@ import java.util.List;
  */
 public interface KuaiShouGroupTemplateMapper extends BaseMapper<KuaiShouGroupTemplate> {
 
-    JSONObject getMd5ByPhotoId(@Param("photoId") Long photoId);
+    JSONObject getMd5ByPhotoId(@Param("photoId") String photoId);
 
     List<JSONObject> getImageListByMd5(@Param("md5") String md5);
 

+ 87 - 50
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml

@@ -443,7 +443,13 @@
         t1.user_id
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.code
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -457,8 +463,6 @@
         </if>
         ) t3 ON t3.id = t1.user_id
         WHERE t2.parent_id in(60155,60156)
-        AND t4.stat_date &gt;= #{startTime}
-        AND t4.stat_date &lt;= concat(#{endTime},' 23:59:59')
         GROUP BY t1.user_id
         ) t
     </select>
@@ -481,7 +485,13 @@
         t3.role_name
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.code
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -495,8 +505,6 @@
         </if>
         ) t3 ON t3.id = t1.user_id
         WHERE t2.parent_id in(60155,60156)
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
         GROUP BY t1.user_id
         ) k
         LEFT JOIN
@@ -505,7 +513,13 @@
         t1.user_id, SUM(t5.charge) 'zhenren_charge'
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.`code`
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -519,10 +533,7 @@
         </if>
         ) t3 ON t3.id = t1.user_id
         LEFT JOIN ctop_kuaishou_report_daily_material t5 ON  t1.`code` = t5.signature
-        WHERE 1=1
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
-        AND t2.parent_id = 60155
+        WHERE t2.parent_id = 60155
         GROUP BY t1.user_id
         ) k1 ON k1.user_id =k.user_id
         LEFT JOIN
@@ -531,7 +542,13 @@
         t1.user_id,t4.signature
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.`code`
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -544,10 +561,7 @@
             AND tt3.role_code = #{roleCode}
         </if>
         ) t3 ON t3.id = t1.user_id
-        WHERE 1=1
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
-        AND t2.parent_id = 60155
+        WHERE t2.parent_id = 60155
         GROUP BY t1.user_id,t1.`code`
         ) t
         GROUP BY user_id
@@ -558,7 +572,13 @@
         t1.user_id, SUM(t5.charge) 'zhizuo_charge'
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.`code`
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -572,10 +592,7 @@
         </if>
         ) t3 ON t3.id = t1.user_id
         LEFT JOIN ctop_kuaishou_report_daily_material t5 ON  t1.`code` = t5.signature
-        WHERE 1=1
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
-        AND t2.parent_id = 60156
+        WHERE t2.parent_id = 60156
         GROUP BY t1.user_id
         )k3 ON k3.user_id =k.user_id
         LEFT JOIN
@@ -584,7 +601,13 @@
         t1.user_id,t4.signature
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.`code`
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -597,10 +620,7 @@
             AND tt3.role_code = #{roleCode}
         </if>
         ) t3 ON t3.id = t1.user_id
-        WHERE 1=1
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
-        AND t2.parent_id = 60156
+        WHERE  t2.parent_id = 60156
         GROUP BY t1.user_id,t1.`code`
         ) t
         GROUP BY user_id
@@ -632,7 +652,13 @@
         t3.role_name
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.code
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -646,8 +672,6 @@
         </if>
         ) t3 ON t3.id = t1.user_id
         WHERE t2.parent_id in(60155,60156)
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
         GROUP BY t1.user_id
         ) k
         LEFT JOIN
@@ -656,8 +680,15 @@
         t1.user_id, SUM(t5.charge) 'zhenren_charge'
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.`code`
-        INNER JOIN(
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
+        INNER JOIN
+        (
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
         LEFT JOIN sys_role tt3 ON tt2.role_id = tt3.id
@@ -670,10 +701,7 @@
         </if>
         ) t3 ON t3.id = t1.user_id
         LEFT JOIN ctop_kuaishou_report_daily_material t5 ON  t1.`code` = t5.signature
-        WHERE 1=1
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
-        AND t2.parent_id = 60155
+        WHERE t2.parent_id = 60155
         GROUP BY t1.user_id
         )k1 ON k1.user_id =k.user_id
         LEFT JOIN
@@ -682,7 +710,13 @@
         t1.user_id,t4.signature
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.`code`
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -695,10 +729,7 @@
             AND tt3.role_code = #{roleCode}
         </if>
         ) t3 ON t3.id = t1.user_id
-        WHERE 1=1
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
-        AND t2.parent_id = 60155
+        WHERE t2.parent_id = 60155
         GROUP BY t1.user_id,t1.`code`
         ) t
         GROUP BY user_id
@@ -709,7 +740,13 @@
         t1.user_id, SUM(t5.charge) 'zhizuo_charge'
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.`code`
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -723,10 +760,7 @@
         </if>
         ) t3 ON t3.id = t1.user_id
         LEFT JOIN ctop_kuaishou_report_daily_material t5 ON  t1.`code` = t5.signature
-        WHERE 1=1
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
-        AND t2.parent_id = 60156
+        WHERE t2.parent_id = 60156
         GROUP BY t1.user_id
         )k3 ON k3.user_id =k.user_id
         LEFT JOIN
@@ -735,7 +769,13 @@
         t1.user_id,t4.signature
         FROM ctop_material_tag_info t1
         LEFT JOIN ctop_tag_info  t2 ON t2.id = t1.tag_id
-        LEFT JOIN ctop_kuaishou_video_get t4 ON t4.signature= t1.`code`
+        INNER JOIN
+        (
+        SELECT signature  FROM ctop_kuaishou_video_get
+        WHERE  stat_date &gt;=  #{startTime}
+        AND stat_date &lt;=  concat(#{endTime},' 23:59:59')
+        GROUP BY signature
+        ) t4 ON t4.signature= t1.`code`
         INNER JOIN(
         SELECT tt1.id,tt3.role_name,tt1.realname FROM sys_user tt1
         LEFT JOIN sys_user_role tt2 ON tt1.id = tt2.user_id
@@ -748,10 +788,7 @@
             AND tt3.role_code = #{roleCode}
         </if>
         ) t3 ON t3.id = t1.user_id
-        WHERE 1=1
-        AND t4.stat_date &gt;=  #{startTime}
-        AND t4.stat_date &lt;=  concat(#{endTime},' 23:59:59')
-        AND t2.parent_id = 60156
+        WHERE t2.parent_id = 60156
         GROUP BY t1.user_id,t1.`code`
         ) t
         GROUP BY user_id

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

@@ -308,7 +308,6 @@
         <if test="updateTime!=null and updateTime!=''">
             AND t1.update_time &gt; #{updateTime}
         </if>
-        group by t1.signature
     </select>
 
     <select id="getAccountIds" resultType="com.alibaba.fastjson.JSONObject">

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

@@ -599,7 +599,7 @@ public class KuaiShouGroupTemplateServiceImpl extends ServiceImpl<KuaiShouGroupT
         Integer createType = template.getCreateType();
         if (createType == 0) { // 单品
             Long photoId = template.getPhotoId();
-            JSONObject videoMd5Json = groupTemplateMapper.getMd5ByPhotoId(photoId);
+            JSONObject videoMd5Json = groupTemplateMapper.getMd5ByPhotoId(String.valueOf(photoId));
             if (Check.isNull(videoMd5Json)) {
                 log.error("未获取到素材详细信息,accountId:{},unitId:{}", template.getAccountId(), unitId);
                 updateTemplate.setCreativeStatus(3);
@@ -655,7 +655,7 @@ public class KuaiShouGroupTemplateServiceImpl extends ServiceImpl<KuaiShouGroupT
             }
             for (int i = 0; i < array.size(); i++) {
                 Long photoId = array.getLong(i);
-                JSONObject videoJson = groupTemplateMapper.getMd5ByPhotoId(photoId);
+                JSONObject videoJson = groupTemplateMapper.getMd5ByPhotoId(String.valueOf(photoId));
                 if (Check.isNull(videoJson)) {
                     log.error("未获取到素材详细信息,accountId:{},unitId:{}", template.getAccountId(), unitId);
                     updateTemplate.setCreativeStatus(3);

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

@@ -59,17 +59,8 @@ public class KsVideoReportCtrl {
     public Result<PageInfo<JSONObject>> getListReport(@RequestBody JSONObject requestBody) {
         Result<PageInfo<JSONObject>> result = new Result<>();
         try {
-            if (Check.isNull(requestBody)) {
-                new Exception("入参不能为空");
-            }
             int pageSize = requestBody.getInteger("pageSize");
-            if (Check.isNull(pageSize)) {
-                throw new Exception("请输入查询每页条数");
-            }
             int pageNo = requestBody.getInteger("pageNo");
-            if (Check.isNull(pageNo)) {
-                throw new Exception("请输入查询页数");
-            }
             String startDate = requestBody.getString("startDate");
             if (Check.isNull(startDate)) {
                 throw new Exception("请输入查询开始时间");

+ 6 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/mapper/BytedanceImageInfoMapper.java

@@ -16,7 +16,12 @@ public interface BytedanceImageInfoMapper extends BaseMapper<BytedanceImageInfo>
 
     void replaceBatch(@Param(value = "imageInfos")List<BytedanceImageInfo> imageInfos);
 
+    //大图竖图
     void updateImageVerticalType();
-
+    //大图横图
     void updateImageHorizonType();
+    //开屏
+    void updateImageUnionType();
+    //开屏 或者 竖图
+    void updateImageUnionIOrVerticalType();
 }

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

@@ -15,7 +15,8 @@
         signature,
         image_create_time,
         create_time,
-        update_time,image_url)
+        update_time,image_url,
+        file_name)
         values
         <foreach collection="imageInfos" item="imageInfo" separator=",">
             (#{imageInfo.id},
@@ -29,10 +30,28 @@
             #{imageInfo.signature},
             #{imageInfo.imageCreateTime},
             #{imageInfo.createTime},
-            #{imageInfo.updateTime},#{imageInfo.imageUrl})
+            #{imageInfo.updateTime},#{imageInfo.imageUrl},
+            #{imageInfo.fileName})
         </foreach>
     </insert>
 
+    <!-- 开屏 或者 竖图 -->
+    <update id="updateImageUnionIOrVerticalType">
+        update
+            ctop_bytedance_image_info
+        set type = 4
+        where width &lt; height and (type is null or type = 3)
+          and (width between 1080 and 1440)  and (height between 1920 and 2560)
+    </update>
+    <!-- 开屏 -->
+    <update id="updateImageUnionType">
+        update
+            ctop_bytedance_image_info
+        set type = 3
+        where width &lt; height and type is null
+          and (width between 1080 and 2160)  and (height between 1920 and 3840)
+    </update>
+    <!-- 大图竖图 -->
     <update id="updateImageVerticalType">
         update
             ctop_bytedance_image_info
@@ -40,6 +59,7 @@
         where height &gt; width and type is null
         and (height between 1280 and 2560)  and (width between 720 and 1440);
     </update>
+    <!-- 大图横图 -->
     <update id="updateImageHorizonType">
         update ctop_bytedance_image_info
             set type = 1

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/IBytedanceImageInfoService.java

@@ -14,5 +14,8 @@ import java.util.List;
 public interface IBytedanceImageInfoService extends IService<BytedanceImageInfo> {
     void replaceBatch(List<BytedanceImageInfo> videoInfoList);
 
+    /**
+     * 清洗图片素材类型
+     */
     void updateType();
 }

+ 6 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/BytedanceImageInfoServiceImpl.java

@@ -27,7 +27,13 @@ public class BytedanceImageInfoServiceImpl extends ServiceImpl<BytedanceImageInf
 
     @Override
     public void updateType() {
+        //大图竖图 -2
         imageInfoMapper.updateImageVerticalType();
+        //大图横图 -1
         imageInfoMapper.updateImageHorizonType();
+        //开屏-3
+        imageInfoMapper.updateImageUnionType();
+        //开屏 或者 竖图 -4
+        imageInfoMapper.updateImageUnionIOrVerticalType();
     }
 }

+ 0 - 3
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/operation/util/GetChangeDateUtil.java

@@ -1,13 +1,10 @@
 package cn.com.ctop.toutiao.modules.operation.util;
 
 import cn.com.ctop.common.module.entity.SysUser;
-import cn.com.ctop.toutiao.modules.operation.entity.BytedanceOperationLog;
-import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
 
 import java.beans.Introspector;
 import java.beans.PropertyDescriptor;
 import java.lang.reflect.Method;
-import java.security.Timestamp;
 import java.util.*;
 
 public class GetChangeDateUtil {

+ 0 - 17
pom.xml

@@ -69,25 +69,8 @@
             <name>maven-3rdparty</name>
             <url>https://packages.atlassian.com/maven-3rdparty/</url>
         </repository>
-
-        <repository>
-            <id>ctop</id>
-            <name>ctop</name>
-            <url>http://118.24.244.213:8081/repository/3rd_part</url>
-        </repository>
     </repositories>
 
-    <pluginRepositories>
-        <pluginRepository>
-            <snapshots>
-                <enabled>true</enabled>
-            </snapshots>
-            <id>ctop</id>
-            <url>http://118.24.244.213:8081/repository/3rd_part</url>
-        </pluginRepository>
-    </pluginRepositories>
-
-
     <properties>
         <jeecgboot.common.version>2.0.2</jeecgboot.common.version>
         <java.version>1.8</java.version>