Selaa lähdekoodia

Merge branch 'master' into test

songyh 4 vuotta sitten
vanhempi
commit
9b7b98daf7

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

+ 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)) {

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

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

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

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

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

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

+ 2 - 2
pom.xml

@@ -73,7 +73,7 @@
         <repository>
             <id>ctop</id>
             <name>ctop</name>
-            <url>http://118.24.244.213:8081/repository/3rd_part</url>
+            <url>http://118.24.244.213:8081/3rd_part/</url>
         </repository>
     </repositories>
 
@@ -83,7 +83,7 @@
                 <enabled>true</enabled>
             </snapshots>
             <id>ctop</id>
-            <url>http://118.24.244.213:8081/repository/3rd_part</url>
+            <url>http://118.24.244.213:8081/3rd_part/</url>
         </pluginRepository>
     </pluginRepositories>