Przeglądaj źródła

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

# Conflicts:
#	jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java
syh 4 lat temu
rodzic
commit
07c0014948
100 zmienionych plików z 1986 dodań i 1008 usunięć
  1. 22 13
      jeecg-boot-base-common/src/main/java/org/jeecg/common/constant/AccountReportConstants.java
  2. 36 0
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java
  3. 4 9
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/MD5Util.java
  4. 1 1
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/PmsUtil.java
  5. 1 5
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/db/FreemarkerParseFactory.java
  6. 1 7
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/dynamic/db/FreemarkerParseFactory.java
  7. 2 2
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/oConvertUtils.java
  8. 9 0
      jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java
  9. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/config/jimureport/JimureportServiceImpl.java
  10. 2 2
      jeecg-boot-base-common/src/main/java/org/jeecg/common/system/controller/CommonController.java
  11. 2 2
      jeecg-boot-base-common/src/main/java/org/jeecg/common/system/base/controller/JeecgController.java
  12. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ads/controller/KuaishouStrategyController.java
  13. 134 130
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/append/xd_schedule/controller/XdScheduleController.java
  14. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/controller/CasClientController.java
  15. 8 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/XmlUtils.java
  16. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ActorController.java
  17. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AdCoverController.java
  18. 6 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AdvertiserController.java
  19. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AgentInfoController.java
  20. 271 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AiKuaishouAdvertiserStrategyController.java
  21. 2 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountAuthController.java
  22. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountLoginController.java
  23. 1 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceTemplateController.java
  24. 2 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceMusicInfoController.java
  25. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceMusicTypeController.java
  26. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceVideoEtlInfoController.java
  27. 12 13
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java
  28. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CorpFeishuUserController.java
  29. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CtopOauthTokenController.java
  30. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/DictMusicTypeController.java
  31. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/FileInfoController.java
  32. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/GraphqlController.java
  33. 1 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/JhsBakendDataController.java
  34. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaiShouDefectMaterialController.java
  35. 245 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaiShouOcpxActionTypeConfigController.java
  36. 154 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAccountSpeedExploreLogController.java
  37. 2 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAdvertiserController.java
  38. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAgentAccountController.java
  39. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAppAccountController.java
  40. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAppProductController.java
  41. 1 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouChannelRegInfoController.java
  42. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouEffectAdInfoController.java
  43. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouEffectVideoInfoController.java
  44. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouHotPhotoInfoController.java
  45. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouInspiredAdController.java
  46. 15 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouVideoEtlInfoController.java
  47. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialAscriptionController.java
  48. 23 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialCutFrameController.java
  49. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialImageInfoController.java
  50. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialImageVideoInfoController.java
  51. 1 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialInfoController.java
  52. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialParameterController.java
  53. 331 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialReportOverViewController.java
  54. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialTagController.java
  55. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialTagInfoController.java
  56. 1 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialVideoAuthorController.java
  57. 6 9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialVideoCoverController.java
  58. 4 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialVideoFrameController.java
  59. 4 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialVideoInfoController.java
  60. 5 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialVideoProjectController.java
  61. 4 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialVideoWatermarkController.java
  62. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MusicKuaishouTypeController.java
  63. 246 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/OauthConfigController.java
  64. 2 2
      module-common/src/main/java/cn/com/ctop/common/module/controller/ProductController.java
  65. 9 42
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectController.java
  66. 18 65
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectMemberController.java
  67. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectTransferRecordController.java
  68. 5 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/PropController.java
  69. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ReleaseRecordController.java
  70. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ReleaseViewRecordController.java
  71. 2 2
      module-common/src/main/java/cn/com/ctop/common/module/controller/RuleDataAccountController.java
  72. 2 2
      module-common/src/main/java/cn/com/ctop/common/module/controller/RuleDataCreativeController.java
  73. 2 2
      module-common/src/main/java/cn/com/ctop/common/module/controller/RuleDataPlanController.java
  74. 2 2
      module-common/src/main/java/cn/com/ctop/common/module/controller/RuleDataTargetController.java
  75. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SalePerformanceDetailController.java
  76. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ScriptTagInfoController.java
  77. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SupplierListController.java
  78. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SupplierWatermarkController.java
  79. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SyncDataController.java
  80. 18 28
      module-common/src/main/java/cn/com/ctop/common/module/message/controller/SysMessageController.java
  81. 18 28
      module-common/src/main/java/cn/com/ctop/common/module/message/controller/SysMessageTemplateController.java
  82. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TagInfoController.java
  83. 285 335
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  84. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TransferAccountController.java
  85. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UReportFileBindUserController.java
  86. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UReportFileController.java
  87. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UserAllocationController.java
  88. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/VideoMergeTaskController.java
  89. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/VideoPartController.java
  90. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/VideoWatermarkTaskController.java
  91. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/VideoWatermarkTemplateController.java
  92. 2 2
      module-common/src/main/java/cn/com/ctop/common/module/controller/WarningOperationLogController.java
  93. 5 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/YardController.java
  94. 0 62
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouDailyAccountReportLoadJob.java
  95. 0 60
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouDailyAccountReportNextDayStayJob.java
  96. 4 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouDailyGroupReportLoadJob.java
  97. 1 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouHourlyAccountReportLoadJob.java
  98. 0 55
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouSuZaoLoadJob.java
  99. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/MergeVideoJob.java
  100. 0 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/AdvertiserMapper.java

+ 22 - 13
jeecg-boot-base-common/src/main/java/org/jeecg/common/constant/AccountReportConstants.java

@@ -6,18 +6,20 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- *  Created by JQ.bi on 2020.5.30
+ * Created by JQ.bi on 2020.5.30
  */
 public class AccountReportConstants {
 
     /**
      * 私有构造器
      */
-    private AccountReportConstants(){
+    private AccountReportConstants() {
 
     }
 
-    /** 单体实例 */
+    /**
+     * 单体实例
+     */
     private static AccountReportConstants instance;
 
     /**
@@ -34,22 +36,29 @@ public class AccountReportConstants {
      * 字典数据
      */
     //头条字段映射
-    public static Map<String, Map<String,Object>> dicMapBy = new HashMap<>();
+    public static Map<String, Map<String, Object>> dicMapBy = new HashMap<>();
     //快手字段映射
-    public static Map<String, Map<String,Object>> dicMapKs = new HashMap<>();
+    public static Map<String, Map<String, Object>> dicMapKs = new HashMap<>();
     //头条视频报表字段映射
-    public static Map<String, Map<String,Object>> dicMapByVideo= new HashMap<>();
+    public static Map<String, Map<String, Object>> dicMapByVideo = new HashMap<>();
+    public static Map<String, Map<String, Object>> kuaishouVideoReportMap = new HashMap<>();
+    public static Map<String, Map<String, Object>> kuaishouVideoReportDict = new HashMap<>();
+
     /**
      * 初始化字典
      */
-    public void init(){
+    public void init() {
         //加载json文件
-        Object jsonBy=JsonResourceUtil.getJsonObjFromResource("/json_template/bytedance_filed_mapping.json");
-        Object jsonKs=JsonResourceUtil.getJsonObjFromResource("/json_template/kuaishou_filed_mapping.json");
-        Object jsonByVideo=JsonResourceUtil.getJsonObjFromResource("/json_template/bytedance_video_report_mapping.json");
+        Object jsonBy = JsonResourceUtil.getJsonObjFromResource("/json_template/bytedance_filed_mapping.json");
+        Object jsonKs = JsonResourceUtil.getJsonObjFromResource("/json_template/kuaishou_filed_mapping.json");
+        Object KuaiShouVideoJson = JsonResourceUtil.getJsonObjFromResource("/json_template/kuaishou_video_report_filed_mapping.json");
+        Object KuaiShouVideoDictJson = JsonResourceUtil.getJsonObjFromResource("/json_template/kuaishou_video_report_filed_dict.json");
+        Object jsonByVideo = JsonResourceUtil.getJsonObjFromResource("/json_template/bytedance_video_report_mapping.json");
         //json 转为map存为静态常量
-        dicMapBy=JsonResourceUtil.jsonToMap(jsonBy);
-        dicMapKs=JsonResourceUtil.jsonToMap(jsonKs);
-        dicMapByVideo=JsonResourceUtil.jsonToMap(jsonByVideo);
+        dicMapBy = JsonResourceUtil.jsonToMap(jsonBy);
+        dicMapKs = JsonResourceUtil.jsonToMap(jsonKs);
+        dicMapByVideo = JsonResourceUtil.jsonToMap(jsonByVideo);
+        kuaishouVideoReportMap = JsonResourceUtil.jsonToMap(KuaiShouVideoJson);
+        kuaishouVideoReportDict = JsonResourceUtil.jsonToMap(KuaiShouVideoDictJson);
     }
 }

+ 36 - 0
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java

@@ -138,6 +138,9 @@ public class DateUtils extends PropertyEditorSupport {
         return format;
     }
 
+
+
+
     // 指定模式的时间格式
     private static SimpleDateFormat getSDFormat(String pattern) {
         return new SimpleDateFormat(pattern);
@@ -1563,6 +1566,39 @@ public class DateUtils extends PropertyEditorSupport {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         return sdf.format(calendar.getTime());
     }
+
+    /**
+     * 获取两个日期之间的所有日期集合
+     * @author ZHAOXA
+     * @param
+     * @return java.util.List<java.lang.String>
+     * @throws
+     */
+    public static List<String> getDays(String startTime, String endTime) {
+        // 返回的日期集合
+        List<String> days = new ArrayList<String>();
+        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            Date start = dateFormat.parse(startTime);
+            Date end = dateFormat.parse(endTime);
+
+            Calendar tempStart = Calendar.getInstance();
+            tempStart.setTime(start);
+
+            Calendar tempEnd = Calendar.getInstance();
+            tempEnd.setTime(end);
+            tempEnd.add(Calendar.DATE, +1);// 日期加1(包含结束)
+            while (tempStart.before(tempEnd)) {
+                days.add(dateFormat.format(tempStart.getTime()));
+                tempStart.add(Calendar.DAY_OF_YEAR, 1);
+            }
+
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+
+        return days;
+    }
 }
 
 

+ 4 - 9
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/MD5Util.java

@@ -28,13 +28,13 @@ public class MD5Util {
 		}
 		return String.valueOf(str);
 	}
-	public static String getMd5(String msg) {
+	public static String getMd5(String url) {
 		MessageDigest md5 = MD5.get();
 		md5.reset();
-		return toHexStr(md5.digest(msg.getBytes()));
+		return toHexStr(md5.digest(url.getBytes()));
 	}
 
-	public static String byteArrayToHexString(byte b[]) {
+	public static String byteArrayToHexString(byte[] b) {
 		StringBuffer resultSb = new StringBuffer();
 		for (int i = 0; i < b.length; i++){
 			resultSb.append(byteToHexString(b[i]));
@@ -80,7 +80,7 @@ public class MD5Util {
 		}
 		return resultString;
 	}
-	private static final String hexDigits[] = { "0", "1", "2", "3", "4", "5",
+	private static final String[] hexDigits = { "0", "1", "2", "3", "4", "5",
 			"6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
 	private static final String[] HEX_DIGITS = {"0", "1", "2", "3", "4", "5",
 			"6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
@@ -89,9 +89,4 @@ public class MD5Util {
 	public static String getFileMd5(String path) throws Exception {
 		return DigestUtils.md5Hex(new FileInputStream(path));
 	}
-
-	public static void main(String[] args) throws Exception {
-		System.out.println(getFileMd5("D:\\mnt\\0427有缘3-帆楠E打车-同城热恋-1587982341839.mp4"));
-		System.out.println(getFileMd5("D:\\mnt\\0427有缘4-帆楠E洗脚-同城热恋-1593661309704.mp4"));
-	}
 }

+ 1 - 1
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/PmsUtil.java

@@ -41,7 +41,7 @@ public class PmsUtil {
             for (String s : msg) {
                 //写数据
                 if (s.indexOf("_") > 0) {
-                    String arr[] = s.split("_");
+                    String[] arr = s.split("_");
                     bw.write("第" + arr[0] + "行:" + arr[1]);
                 } else {
                     bw.write(s);

+ 1 - 5
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/db/FreemarkerParseFactory.java

@@ -100,8 +100,6 @@ public class FreemarkerParseFactory {
         } catch (Exception e) {
             log.error(e.getMessage(), e.fillInStackTrace());
             log.error("发送一次的模板key:{ " + tplName + " }");
-            //System.err.println(e.getMessage());
-            //System.err.println("模板名:{ "+ tplName +" }");
             throw new RuntimeException("解析SQL模板异常");
         }
     }
@@ -132,8 +130,6 @@ public class FreemarkerParseFactory {
         } catch (Exception e) {
             log.error(e.getMessage(), e.fillInStackTrace());
             log.error("发送一次的模板key:{ " + tplContent + " }");
-            //System.err.println(e.getMessage());
-            //System.err.println("模板内容:{ "+ tplContent +" }");
             throw new RuntimeException("解析SQL模板异常");
         }
     }
@@ -168,4 +164,4 @@ public class FreemarkerParseFactory {
         }
         return sql;
     }
-}
+}

+ 1 - 7
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/dynamic/db/FreemarkerParseFactory.java

@@ -6,8 +6,6 @@ import freemarker.template.Configuration;
 import freemarker.template.Template;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.jeecgframework.codegenerate.generate.util.SimpleFormat;
 
 import java.io.StringWriter;
@@ -102,8 +100,6 @@ public class FreemarkerParseFactory {
         } catch (Exception e) {
             log.error(e.getMessage(), e.fillInStackTrace());
             log.error("发送一次的模板key:{ " + tplName + " }");
-            //System.err.println(e.getMessage());
-            //System.err.println("模板名:{ "+ tplName +" }");
             throw new RuntimeException("解析SQL模板异常");
         }
     }
@@ -134,8 +130,6 @@ public class FreemarkerParseFactory {
         } catch (Exception e) {
             log.error(e.getMessage(), e.fillInStackTrace());
             log.error("发送一次的模板key:{ " + tplContent + " }");
-            //System.err.println(e.getMessage());
-            //System.err.println("模板内容:{ "+ tplContent +" }");
             throw new RuntimeException("解析SQL模板异常");
         }
     }
@@ -170,4 +164,4 @@ public class FreemarkerParseFactory {
         }
         return sql;
     }
-}
+}

+ 2 - 2
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/oConvertUtils.java

@@ -432,7 +432,7 @@ public class oConvertUtils {
 			//update-end--Author:zhoujf  Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能
 		}
 		// 用下划线将原始字符串分割
-		String camels[] = name.split("_");
+		String[] camels = name.split("_");
 		for (String camel : camels) {
 			// 跳过原始字符串中开头、结尾的下换线或双重下划线
 			if (camel.isEmpty()) {
@@ -495,7 +495,7 @@ public class oConvertUtils {
 			return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();
 		}
 		// 用下划线将原始字符串分割
-		String camels[] = name.split("_");
+		String[] camels = name.split("_");
 		for (String camel : camels) {
 			// 跳过原始字符串中开头、结尾的下换线或双重下划线
 			if (camel.isEmpty()) {

+ 9 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java

@@ -186,6 +186,15 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/template/kuaiShouBatchCreativeTemplate/*", "anon");
         filterChainDefinitionMap.put("/template/kuaiShouBatchGroupTemplate/*", "anon");
         filterChainDefinitionMap.put("/template/kuaiShouBatchCampaignTemplate/*", "anon");
+        filterChainDefinitionMap.put("/template/**", "anon");
+        filterChainDefinitionMap.put("/batch/kuaiShouGroupTemplate/*", "anon");
+        filterChainDefinitionMap.put("/kuaishouBatch/**", "anon");
+        filterChainDefinitionMap.put("/kuaishou/creative/*", "anon");
+        filterChainDefinitionMap.put("/ai/aiKuaiShouAppInfo/*", "anon");
+        filterChainDefinitionMap.put("/explore/*", "anon");
+        filterChainDefinitionMap.put("/ai/batchUpdate/*", "anon");
+        filterChainDefinitionMap.put("/ctop/kuaishou/videoReport/*", "anon");
+        //filterChainDefinitionMap.put("/overView/*", "anon");
 
         // 添加自己的过滤器并且取名为jwt
         Map<String, Filter> filterMap = new HashMap<>(1);

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/config/jimureport/JimureportServiceImpl.java

@@ -1,9 +1,9 @@
 package org.jeecg.config.jimureport;
 
-import org.jeecg.common.system.api.ISysBaseApi;
+import cn.com.ctop.common.module.service.ISysBaseApi;
 import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.util.RedisUtil;
-import org.jeecg.common.util.TokenUtils;
+import cn.com.ctop.common.module.utils.TokenUtils;
 import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
@@ -33,4 +33,4 @@ class JimureportServiceImpl implements JmReportTokenServiceI {
     public Boolean verifyToken(String token) {
         return TokenUtils.verifyToken(token, sysBaseAPI, redisUtil);
     }
-}
+}

+ 2 - 2
jeecg-boot-base-common/src/main/java/org/jeecg/common/system/controller/CommonController.java

@@ -1,5 +1,6 @@
-package org.jeecg.common.system.controller;
+package org.jeecg.modules.ads.controller;
 
+import cn.com.ctop.common.module.utils.TokenUtils;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
@@ -7,7 +8,6 @@ import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.util.CommonUtils;
 import org.jeecg.common.util.RestUtil;
-import org.jeecg.common.util.TokenUtils;
 import org.jeecg.common.util.oConvertUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpHeaders;

+ 2 - 2
jeecg-boot-base-common/src/main/java/org/jeecg/common/system/base/controller/JeecgController.java

@@ -1,12 +1,12 @@
-package org.jeecg.common.system.base.controller;
+package org.jeecg.modules.ads.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.IService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ads/controller/KuaishouStrategyController.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.ads.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.ai.service.IAiStrategyService;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouStrategy;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouStrategyService;
@@ -16,7 +17,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;

+ 134 - 130
jeecg-boot-module-system/src/main/java/org/jeecg/modules/append/xd_schedule/controller/XdScheduleController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.append.xd_schedule.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -7,8 +8,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.base.controller.JeecgController;
-import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.ads.controller.JeecgController;
 import org.jeecg.modules.append.xd_schedule.entity.XdSchedule;
 import org.jeecg.modules.append.xd_schedule.service.IXdScheduleService;
 import org.jeecg.modules.append.xd_schedule.service.impl.XdScheduleServiceImpl;
@@ -20,149 +20,153 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.util.Arrays;
 
- /**
+/**
  * @Description: 时间表
  * @Author: jeecg-boot
- * @Date:   2019-10-29
+ * @Date: 2019-10-29
  * @Version: V1.0
  */
 @Slf4j
-@Api(tags="时间表")
+@Api(tags = "时间表")
 @RestController
 @RequestMapping("/xd_schedule/xdSchedule")
 public class XdScheduleController extends JeecgController<XdSchedule, IXdScheduleService> {
-	@Autowired
-	private XdScheduleServiceImpl xdScheduleService;
+    @Autowired
+    private XdScheduleServiceImpl xdScheduleService;
 
-	/**
-	 * 分页列表查询
-	 *
-	 * @param xdSchedule
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@ApiOperation(value="时间表-分页列表查询", notes="时间表-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<?> queryPageList(XdSchedule xdSchedule,
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-								   HttpServletRequest req) {
-		QueryWrapper<XdSchedule> queryWrapper = QueryGenerator.initQueryWrapper(xdSchedule, req.getParameterMap());
-		Page<XdSchedule> page = new Page<XdSchedule>(pageNo, pageSize);
-		queryWrapper.orderByAsc("DAY");
-		IPage<XdSchedule> pageList = xdScheduleService.page(page, queryWrapper);
-		return Result.ok(pageList);
-	}
+    /**
+     * 分页列表查询
+     *
+     * @param xdSchedule
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "时间表-分页列表查询", notes = "时间表-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<?> queryPageList(XdSchedule xdSchedule,
+                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                   HttpServletRequest req) {
+        QueryWrapper<XdSchedule> queryWrapper = QueryGenerator.initQueryWrapper(xdSchedule, req.getParameterMap());
+        Page<XdSchedule> page = new Page<XdSchedule>(pageNo, pageSize);
+        queryWrapper.orderByAsc("DAY");
+        IPage<XdSchedule> pageList = xdScheduleService.page(page, queryWrapper);
+        return Result.ok(pageList);
+    }
 
-	/**
-	 * 添加
-	 *
-	 * @param xdSchedule
-	 * @return
-	 */
-	@ApiOperation(value="时间表-添加", notes="时间表-添加")
-	@PostMapping(value = "/add")
-	public Result<?> add(@RequestBody XdSchedule xdSchedule) {
-		xdScheduleService.save(xdSchedule);
-		return Result.ok("添加成功!");
-	}
+    /**
+     * 添加
+     *
+     * @param xdSchedule
+     * @return
+     */
+    @ApiOperation(value = "时间表-添加", notes = "时间表-添加")
+    @PostMapping(value = "/add")
+    public Result<?> add(@RequestBody XdSchedule xdSchedule) {
+        xdScheduleService.save(xdSchedule);
+        return Result.ok("添加成功!");
+    }
 
-	/**
-	 * 编辑
-	 *
-	 * @param xdSchedule
-	 * @return
-	 */
-	@ApiOperation(value="时间表-编辑", notes="时间表-编辑")
-	@PutMapping(value = "/edit")
-	public Result<?> edit(@RequestBody XdSchedule xdSchedule) {
-		xdScheduleService.updateById(xdSchedule);
-		return Result.ok("编辑成功!");
-	}
+    /**
+     * 编辑
+     *
+     * @param xdSchedule
+     * @return
+     */
+    @ApiOperation(value = "时间表-编辑", notes = "时间表-编辑")
+    @PutMapping(value = "/edit")
+    public Result<?> edit(@RequestBody XdSchedule xdSchedule) {
+        xdScheduleService.updateById(xdSchedule);
+        return Result.ok("编辑成功!");
+    }
 
-	/**
-	 * 通过id删除
-	 *
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value="时间表-通过id删除", notes="时间表-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		xdScheduleService.removeById(id);
-		return Result.ok("删除成功!");
-	}
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "时间表-通过id删除", notes = "时间表-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        xdScheduleService.removeById(id);
+        return Result.ok("删除成功!");
+    }
 
-	/**
-	 * 批量删除
-	 *
-	 * @param ids
-	 * @return
-	 */
-	@ApiOperation(value="时间表-批量删除", notes="时间表-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		this.xdScheduleService.removeByIds(Arrays.asList(ids.split(",")));
-		return Result.ok("批量删除成功!");
-	}
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @ApiOperation(value = "时间表-批量删除", notes = "时间表-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.xdScheduleService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.ok("批量删除成功!");
+    }
 
-	/**
-	 * 通过id查询
-	 *
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value="时间表-通过id查询", notes="时间表-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
-		XdSchedule xdSchedule = xdScheduleService.getById(id);
-		return Result.ok(xdSchedule);
-	}
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "时间表-通过id查询", notes = "时间表-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
+        XdSchedule xdSchedule = xdScheduleService.getById(id);
+        return Result.ok(xdSchedule);
+    }
 
-  /**
-   * 导出excel
-   *
-   * @param request
-   * @param xdSchedule
-   */
-  @RequestMapping(value = "/exportXls")
-  public ModelAndView exportXls(HttpServletRequest request, XdSchedule xdSchedule) {
-      return super.exportXls(request, xdSchedule, XdSchedule.class, "时间表");
-  }
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param xdSchedule
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, XdSchedule xdSchedule) {
+        return super.exportXls(request, xdSchedule, XdSchedule.class, "时间表");
+    }
 
-  /**
-   * 通过excel导入数据
-   *
-   * @param request
-   * @param response
-   * @return
-   */
-  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-      return super.importExcel(request, response, XdSchedule.class);
-  }
-  /**
-   * 获取时间范围
-   *
-   * @param request
-   * @param response
-   * @return
-   */
-  @RequestMapping(value = "/getDateRange")
-  public Result<?> getDateRange(HttpServletRequest request, HttpServletResponse response) {
-	  String weeknum = request.getParameter("weeknum");
-	  String dateRange = xdScheduleService.getDateRange(weeknum, "yyyy/MM/dd", "--");
-	  return Result.ok(dateRange);
-  }
-  /**通过api同步国家法定节假日*/
-  @RequestMapping(value = "/aotuData")
-  public Result<?> aotuData(HttpServletRequest request, HttpServletResponse response) {
-	  String yyyy = request.getParameter("yyyy");
-	  String body = request.getParameter("body");
-	  xdScheduleService.aotuData(yyyy,body);
-	  return Result.ok();
-  }
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, XdSchedule.class);
+    }
+
+    /**
+     * 获取时间范围
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/getDateRange")
+    public Result<?> getDateRange(HttpServletRequest request, HttpServletResponse response) {
+        String weeknum = request.getParameter("weeknum");
+        String dateRange = xdScheduleService.getDateRange(weeknum, "yyyy/MM/dd", "--");
+        return Result.ok(dateRange);
+    }
+
+    /**
+     * 通过api同步国家法定节假日
+     */
+    @RequestMapping(value = "/aotuData")
+    public Result<?> aotuData(HttpServletRequest request, HttpServletResponse response) {
+        String yyyy = request.getParameter("yyyy");
+        String body = request.getParameter("body");
+        xdScheduleService.aotuData(yyyy, body);
+        return Result.ok();
+    }
 
 }

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/controller/CasClientController.java

@@ -1,6 +1,9 @@
 package org.jeecg.modules.cas.controller;
 
+import cn.com.ctop.common.module.entity.SysDepart;
 import cn.com.ctop.common.module.entity.SysUser;
+import cn.com.ctop.common.module.service.ISysDepartService;
+import cn.com.ctop.common.module.service.ISysUserService;
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
@@ -10,9 +13,6 @@ import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.modules.cas.util.CASServiceUtil;
 import org.jeecg.modules.cas.util.XmlUtils;
-import org.jeecg.modules.system.entity.SysDepart;
-import org.jeecg.modules.system.service.ISysDepartService;
-import org.jeecg.modules.system.service.ISysUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpEntity;

+ 8 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/XmlUtils.java

@@ -88,13 +88,15 @@ public final class XmlUtils {
 
             private StringBuilder buffer = new StringBuilder();
 
+            @Override
             public void startElement(final String uri, final String localName, final String qName,
-                    final Attributes attributes) throws SAXException {
+                                     final Attributes attributes) throws SAXException {
                 if (localName.equals(element)) {
                     this.foundElement = true;
                 }
             }
 
+            @Override
             public void endElement(final String uri, final String localName, final String qName) throws SAXException {
                 if (localName.equals(element)) {
                     this.foundElement = false;
@@ -103,6 +105,7 @@ public final class XmlUtils {
                 }
             }
 
+            @Override
             public void characters(char[] ch, int start, int length) throws SAXException {
                 if (this.foundElement) {
                     this.buffer.append(ch, start, length);
@@ -139,19 +142,22 @@ public final class XmlUtils {
 
             private boolean foundElement = false;
 
+            @Override
             public void startElement(final String uri, final String localName, final String qName,
-                    final Attributes attributes) throws SAXException {
+                                     final Attributes attributes) throws SAXException {
                 if (localName.equals(element)) {
                     this.foundElement = true;
                 }
             }
 
+            @Override
             public void endElement(final String uri, final String localName, final String qName) throws SAXException {
                 if (localName.equals(element)) {
                     this.foundElement = false;
                 }
             }
 
+            @Override
             public void characters(char[] ch, int start, int length) throws SAXException {
                 if (this.foundElement) {
                     builder.append(ch, start, length);

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ActorController.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.manage.modules.actor.entity.Actor;
 import cn.com.ctop.manage.modules.actor.entity.ActorComment;
 import cn.com.ctop.manage.modules.actor.entity.ActorPhoto;
@@ -15,7 +16,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AdCoverController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.ctop.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.crawler.modules.account.entity.KuaishouAdAccount;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAdAccountService;
 import cn.com.ctop.kuaishou.modules.app.entity.AppAd;
@@ -8,7 +9,6 @@ import cn.com.ctop.kuaishou.modules.app.service.IAppAdService;
 import cn.com.ctop.kuaishou.modules.app.service.IAppVideoService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.system.service.ISysCategoryService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;

+ 6 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AdvertiserController.java

@@ -5,7 +5,9 @@ import cn.com.ctop.common.module.constant.CtopRoleCodeConstant;
 import cn.com.ctop.common.module.entity.Advertiser;
 import cn.com.ctop.common.module.entity.Project;
 import cn.com.ctop.common.module.entity.UserAllocation;
+import cn.com.ctop.common.module.entity.UserCompany;
 import cn.com.ctop.common.module.mapper.ProjectMapper;
+import cn.com.ctop.common.module.mapper.UserCompanyMapper;
 import cn.com.ctop.common.module.service.IProductService;
 import cn.com.ctop.common.module.service.ISysRoleExtService;
 import cn.com.ctop.common.module.service.IUserAllocationService;
@@ -27,17 +29,15 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.modules.ctop.mapper.ProjectMemberMapper;
 import org.jeecg.modules.ctop.service.IAdvertiserService;
 import org.jeecg.modules.excelutil.entity.*;
-import org.jeecg.modules.system.entity.UserCompany;
-import org.jeecg.modules.system.mapper.UserCompanyMapper;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
@@ -58,13 +58,13 @@ import java.util.*;
 public class AdvertiserController {
     @Autowired
     private IAdvertiserService advertiserService;
-    @Autowired
+    @Resource
     private UserCompanyMapper userCompanyMapper;
     @Autowired
     private ISysRoleExtService sysRoleService;
-    @Autowired
+    @Resource
     private ProjectMapper projectMapper;
-    @Autowired
+    @Resource
     private ProjectMemberMapper projectMemberMapper;
     @Autowired
     private IUserAllocationService userAllocationService;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AgentInfoController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -9,7 +10,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.AgentInfo;
 import org.jeecg.modules.ctop.service.IAgentInfoService;

+ 271 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AiKuaishouAdvertiserStrategyController.java

@@ -0,0 +1,271 @@
+package org.jeecg.modules.ctop.controller;
+
+import cn.com.ctop.common.module.constant.CtopRoleCodeConstant;
+import cn.com.ctop.common.module.entity.UserAllocation;
+import cn.com.ctop.common.module.service.IUserAllocationService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
+import cn.com.ctop.common.module.utils.ResultMapUtils;
+import cn.com.ctop.common.module.utils.StatusCode;
+import cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAdvertiserStrategy;
+import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouAdvertiserStrategyService;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouVideoRelateCreativesService;
+import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.modules.system.service.ISysRoleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
+/**
+ * 快手账户策略设置信息表
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-01-25
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ctop/aiKuaishouAdvertiserStrategy")
+public class AiKuaishouAdvertiserStrategyController {
+    @Autowired
+    private IKuaishouVideoRelateCreativesService kuaishouVideoRelateCreativesService;
+    @Autowired
+    private IAiKuaishouAdvertiserStrategyService aiKuaishouAdvertiserStrategyService;
+    @Autowired
+    private IUserAllocationService allocationService;
+    @Autowired
+    private ISysRoleService sysRoleService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param aiKuaishouAdvertiserStrategy
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @GetMapping(value = "/list")
+    public Result<IPage<AiKuaishouAdvertiserStrategy>> queryPageList(AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy,
+                                                                     @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                     HttpServletRequest req) {
+        Result<IPage<AiKuaishouAdvertiserStrategy>> result = new Result<>();
+        QueryWrapper<AiKuaishouAdvertiserStrategy> queryWrapper = QueryGenerator.initQueryWrapper(aiKuaishouAdvertiserStrategy, req.getParameterMap());
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        String roleCode = sysRoleService.getRoleCodeByUserId(user.getId());
+        if(!CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN.equals(roleCode)){
+            queryWrapper.eq("user_id", user.getId());
+        }
+        Page<AiKuaishouAdvertiserStrategy> page = new Page<>(pageNo, pageSize);
+        queryWrapper.orderByDesc("id");
+        IPage<AiKuaishouAdvertiserStrategy> pageList = aiKuaishouAdvertiserStrategyService.page(page, queryWrapper);
+        List<AiKuaishouAdvertiserStrategy> records = pageList.getRecords();
+        List<AiKuaishouAdvertiserStrategy> setData = new ArrayList<>();
+        if (null != records && !records.isEmpty()) {
+            records.forEach(record -> {
+                Long accountId = record.getAccountId();
+                UserAllocation allocation = allocationService.getByAccountId(accountId);
+                if (null != allocation) {
+                    record.setAuthName(allocation.getAuthName());
+                }
+                setData.add(record);
+            });
+            pageList.setRecords(setData);
+        }
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param aiKuaishouAdvertiserStrategy
+     * @return
+     */
+    @PostMapping(value = "/add")
+    public Result<AiKuaishouAdvertiserStrategy> add(@RequestBody AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy) {
+        Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
+        try {
+            Long accountId = aiKuaishouAdvertiserStrategy.getAccountId();
+            AiKuaishouAdvertiserStrategy getEntity = aiKuaishouAdvertiserStrategyService.getByAccountId(accountId);
+            if(null!=getEntity){
+                result.error500("该账户配置信息已经被创建");
+                return result;
+            }
+            UserAllocation allocation = allocationService.getByAccountId(accountId);
+            if(null!=allocation){
+                aiKuaishouAdvertiserStrategy.setUserId(allocation.getUserId());
+            }
+            Integer singleAppId = aiKuaishouAdvertiserStrategy.getSingleAppid();
+            if (null != singleAppId && singleAppId == 1) {
+                Integer appId = Integer.parseInt(JSONArray.parseArray(aiKuaishouAdvertiserStrategy.getAppIdArray()).getString(0));
+                aiKuaishouAdvertiserStrategy.setAppId(appId);
+            }
+            aiKuaishouAdvertiserStrategyService.save(aiKuaishouAdvertiserStrategy);
+            Thread thread = new Thread(){
+                @Override
+                public void run() {
+                    kuaishouVideoRelateCreativesService.videoRelateCreatives(aiKuaishouAdvertiserStrategy.getAccountId());
+                }
+            };
+            thread.start();
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+    /**
+     * 编辑
+     *
+     * @param aiKuaishouAdvertiserStrategy
+     * @return
+     */
+    @PostMapping(value = "/edit")
+    public Result<AiKuaishouAdvertiserStrategy> edit(@RequestBody AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy) {
+        Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
+        AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(aiKuaishouAdvertiserStrategy.getId());
+        if (aiKuaishouAdvertiserStrategyEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            Integer singleAppId = aiKuaishouAdvertiserStrategy.getSingleAppid();
+            if (null != singleAppId && singleAppId == 1) {
+                Integer appId = Integer.parseInt(JSONArray.parseArray(aiKuaishouAdvertiserStrategy.getAppIdArray()).getString(0));
+                aiKuaishouAdvertiserStrategy.setAppId(appId);
+            }
+            boolean ok = aiKuaishouAdvertiserStrategyService.updateById(aiKuaishouAdvertiserStrategy);
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 开启
+     *
+     * @return
+     */
+    @GetMapping(value = "/oprateStatus")
+    public Map<String, Object> oprateStatus(Long id, Integer status) {
+        Map<String, Object> result = new HashMap<>();
+        if (null == id || status == null) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(id);
+        if (aiKuaishouAdvertiserStrategyEntity == null) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        if (status != 0) {
+            status = 1;
+        }
+        aiKuaishouAdvertiserStrategyEntity.setStatus(status);
+        aiKuaishouAdvertiserStrategyService.updateById(aiKuaishouAdvertiserStrategyEntity);
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
+    /**
+     * 开启
+     *
+     * @return
+     */
+    @GetMapping(value = "/oprateCreativeStatus")
+    public Map<String, Object> oprateCreativeStatus(Long id, Integer status) {
+        Map<String, Object> result = new HashMap<>();
+        if (null == id || status == null) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(id);
+        if (aiKuaishouAdvertiserStrategyEntity == null) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        if (status != 0) {
+            status = 1;
+        }
+        aiKuaishouAdvertiserStrategyEntity.setOpenProgramCreate(status);
+        aiKuaishouAdvertiserStrategyService.updateById(aiKuaishouAdvertiserStrategyEntity);
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            aiKuaishouAdvertiserStrategyService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<AiKuaishouAdvertiserStrategy> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.aiKuaishouAdvertiserStrategyService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/queryById")
+    public Result<AiKuaishouAdvertiserStrategy> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
+        AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy = aiKuaishouAdvertiserStrategyService.getById(id);
+        if (aiKuaishouAdvertiserStrategy == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(aiKuaishouAdvertiserStrategy);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    @GetMapping(value = "testCreate")
+    public Map<String,Object> testCreate(Long accountId){
+        return aiKuaishouAdvertiserStrategyService.testCreate(accountId);
+    }
+
+    @GetMapping(value = "aiHistoricalMissingMaterial")
+    public Map<String,Object> aiHistoricalMissingMaterial(Long accountId){
+        return aiKuaishouAdvertiserStrategyService.aiHistoricalMissingMaterial(accountId);
+    }
+}

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

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.BindAccountAuth;
 import cn.com.ctop.common.module.service.IBindAccountAuthService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -13,7 +14,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -54,10 +54,8 @@ public class BindAccountAuthController {
             }
 
             String authorizationType = json.getString("authorizationType");
-            // 0 三方代理商 1 本代理商
-            Integer agentType = json.getInteger("agentType");
             if ("kuaishou".equals(authorizationType)) {
-                codeUrl = bindAccountAuthService.getKuaishouCodeUrl(json.toJSONString(), agentType);
+                codeUrl = bindAccountAuthService.getKuaishouCodeUrl(json);
             }
             if ("bytedance".equals(authorizationType)) {
                 codeUrl = bindAccountAuthService.getByteDanceCodeUrl(json.toJSONString());

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountLoginController.java

@@ -7,6 +7,7 @@ import cn.com.ctop.common.module.mapper.UserAllocationMapper;
 import cn.com.ctop.common.module.service.IBindAccountLoginService;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -17,7 +18,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.ctop.service.ICreateInternalService;
 import org.jeecg.modules.system.service.ISysRoleService;

+ 1 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceTemplateController.java

@@ -3,11 +3,11 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.service.IFileInfoService;
 import cn.com.ctop.common.module.service.IUserAllocationService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.toutiao.modules.material.entity.ByteDanceAdvertisePlan;
 import cn.com.ctop.toutiao.modules.material.entity.ByteDanceCampaign;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertisePlanService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
-import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -15,7 +15,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.system.service.ISysCategoryService;
 import org.springframework.beans.factory.annotation.Autowired;

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceMusicInfoController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.service.IFileInfoService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicInfo;
 import cn.com.ctop.crawler.modules.music.service.IBytedanceMusicInfoService;
 import com.alibaba.fastjson.JSONObject;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -52,7 +52,7 @@ public class BytedanceMusicInfoController {
         response.setCharacterEncoding("UTF-8");
         fileName = URLEncoder.encode(fileName, "UTF-8");
         response.addHeader("Content-Disposition", "attachment;filename=" + fileName);
-        response.addHeader("Content-Length", file.length()+ "");
+        response.addHeader("Content-Length", file.length() + "");
         OutputStream toClient = new BufferedOutputStream(response.getOutputStream());
         response.setContentType("audio/mp3");
         toClient.write(buffer);

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceMusicTypeController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.ctop.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicInfo;
 import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicType;
 import cn.com.ctop.crawler.modules.music.service.IBytedanceMusicInfoService;
@@ -9,7 +10,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

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

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.utils.HttpUtils;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.vo.SheetInfoVo;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceVideoEtlInfo;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceVideoEtlInfoService;
@@ -12,7 +13,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.modules.excelutil.entity.BytedanceVideoEtlInfoEntity;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
@@ -83,7 +83,7 @@ public class BytedanceVideoEtlInfoController {
 				if(null!=endDate&&!"".equals(endDate.trim())){
 					queryWrapper.le("faddish_date",endDate);
 				}
-				queryWrapper.le("faddish_day_num",30);
+				queryWrapper.le("faddish_day_num",14);
 			}else {
 				//上线
 				if(null!=startDate&&!"".equals(startDate.trim())){
@@ -195,7 +195,7 @@ public class BytedanceVideoEtlInfoController {
 			  if(null!=endDate&&!"".equals(endDate.trim())){
 				  queryWrapper.le("faddish_date",endDate);
 			  }
-			  queryWrapper.le("faddish_day_num",30);
+			  queryWrapper.le("faddish_day_num",14);
 		  }else {
 			  //上线
 			  if(null!=startDate&&!"".equals(startDate.trim())){

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

@@ -1,11 +1,14 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
+import cn.com.ctop.common.module.entity.SysDepart;
 import cn.com.ctop.common.module.entity.SysUser;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.mapper.UserAllocationMapper;
 import cn.com.ctop.common.module.service.IBindAccountAuthService;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.service.ISysDepartService;
+import cn.com.ctop.common.module.service.ISysUserService;
 import cn.com.ctop.common.module.utils.*;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
 import cn.com.ctop.kuaishou.modules.material.entity.KuaishouAccessToken;
@@ -21,9 +24,6 @@ import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.util.RedisUtil;
-import org.jeecg.modules.system.entity.SysDepart;
-import org.jeecg.modules.system.service.ISysDepartService;
-import org.jeecg.modules.system.service.ISysUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -119,8 +119,9 @@ public class CallbackController {
             log.info("快手授权返回信息:{}", json);
             log.info("快手授权返回oauthCode:{}", authCode);
             Integer agentType = json.getInteger("agentType");
+            Long appId = json.getLong("appId");
             if (StringUtils.isNotBlank(authCode)) {
-                KuaishouResultToken accessToken = kuaishouInterfaceService.getAccessToken(authCode, agentType);
+                KuaishouResultToken accessToken = kuaishouInterfaceService.getAccessToken(authCode, appId);
                 if (accessToken.getCode() != 0) {
                     throw new Exception("快手回调token返回错误");
                 }
@@ -131,11 +132,14 @@ public class CallbackController {
                         return "授权绑定失败!";
                     }
 
+                    Map<String, Object> advertiseBaseInfoMap = kuaishouInterfaceService.advertiserInfo(accountId, token.getAccessToken());
+                    if ((Integer) advertiseBaseInfoMap.get("code") != 0) {
+                        return "授权绑定失败,失败原因:" + advertiseBaseInfoMap.get("message");
+                    }
                     String advertiserId = json.getString("advertiserId");
                     //指定分配人姓名
                     String userName = json.getString("userName");
-                    // 广告主名称
-                    String advertiserName = json.getString("advertiser_name");
+
                     // 媒体类型: 1 头条 2 快手
                     String mediaId = json.getString("mediaId");
                     //创建人
@@ -147,6 +151,7 @@ public class CallbackController {
 
                     CtopOauthToken topOauthToken = new CtopOauthToken();
                     topOauthToken.setId(String.valueOf(accountId));
+                    topOauthToken.setAppId(json.getLong("appId"));
                     topOauthToken.setAccountId(accountId);
                     topOauthToken.setMediaId("2");
                     topOauthToken.setAdvertiserId(advertiserId);
@@ -162,8 +167,6 @@ public class CallbackController {
                     topOauthToken.setRefreshTokenExpiresIn(refreshTokenExpireInDate);
                     topOauthToken.setUpdateTime(new Date());
                     ctopOauthTokenService.saveOrUpdate(topOauthToken);
-
-
                     QueryWrapper<UserAllocation> userAllocationQueryWrapper = new QueryWrapper<>();
                     userAllocationQueryWrapper.eq("account_id", accountId);
                     userAllocationQueryWrapper.eq("media_id", 2);
@@ -179,10 +182,7 @@ public class CallbackController {
                     userAllocation.setAdvertiserId(advertiserId);
                     userAllocation.setSystemType(systemType);
                     // 获取快手昵称
-                    Map<String, Object> advertiseBaseInfoMap = kuaishouInterfaceService.advertiserInfo(accountId, token.getAccessToken());
-                    if ((Integer) advertiseBaseInfoMap.get("code") == 0) {
-                        userAllocation.setAuthName((String) advertiseBaseInfoMap.get("userName"));
-                    }
+                    userAllocation.setAuthName((String) advertiseBaseInfoMap.get("userName"));
                     userAllocation.setMediaId(mediaId);
                     userAllocation.setAccountId(accountId);
                     userAllocation.setProjectId(projectId);
@@ -199,7 +199,6 @@ public class CallbackController {
                     if (i > 0) {
                         log.info("同步分配用户表完成,task_id:{},accountId:{}", state, accountId);
                     }
-
                     //账号绑定
                     bindAccountAuthService.addBindAccount(accountId, KuaishouInterfaceConstant.LOGIN_TYPE_KUAISHOU, advertiserId);
                     Thread t = new Thread() {

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CorpFeishuUserController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.CorpFeishuUser;
 import cn.com.ctop.common.module.service.ICorpFeishuUserService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CtopOauthTokenController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/DictMusicTypeController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.ctop.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.crawler.modules.music.entity.DictMusicType;
 import cn.com.ctop.crawler.modules.music.service.IDictMusicTypeService;
 import com.alibaba.fastjson.JSONObject;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/FileInfoController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.FileInfo;
 import cn.com.ctop.common.module.service.IFileInfoService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.entity.ImportParams;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/GraphqlController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.ctop.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.graphql.entity.KuaishouVideo;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouVideoService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
@@ -8,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/JhsBakendDataController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.ctop.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.excel.event.AnalysisEventListener;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -9,7 +10,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.JhsBakendData;
 import org.jeecg.modules.ctop.service.IJhsBakendDataService;
@@ -217,7 +217,6 @@ public class JhsBakendDataController {
 			  fis = (FileInputStream) file.getInputStream();
 			  AnalysisEventListener listener = new JhsBakendDataExcelListener();
 			  Boolean flag = ExcelUtils.readExcel(fis, JhsBakendDataEntity.class, listener);
-			  System.out.println("导入是否成功:" + flag);
 		  } catch (Exception e) {
 			  e.printStackTrace();
 		  } finally {

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaiShouDefectMaterialController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -8,7 +9,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.ctop.entity.KuaiShouDefectMaterial;
 import org.jeecg.modules.ctop.service.IKuaiShouDefectMaterialService;
 import org.springframework.beans.factory.annotation.Autowired;

+ 245 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaiShouOcpxActionTypeConfigController.java

@@ -0,0 +1,245 @@
+package org.jeecg.modules.ctop.controller;
+
+import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.entity.KuaiShouOcpxActionTypeConfig;
+import cn.com.ctop.common.module.service.IKuaiShouOcpxActionTypeConfigService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 转化目标字典表
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-02-22
+ */
+@Slf4j
+@Api(tags = "转化目标字典表")
+@RestController
+@RequestMapping("/ocpx/kuaiShouOcpxActionTypeConfig")
+public class KuaiShouOcpxActionTypeConfigController {
+    @Autowired
+    private IKuaiShouOcpxActionTypeConfigService kuaiShouOcpxActionTypeConfigService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param kuaiShouOcpxActionTypeConfig
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "转化目标字典表-分页列表查询")
+    @ApiOperation(value = "转化目标字典表-分页列表查询", notes = "转化目标字典表-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<List<KuaiShouOcpxActionTypeConfig>> queryPageList(KuaiShouOcpxActionTypeConfig kuaiShouOcpxActionTypeConfig,
+                                                                    @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                    @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                    HttpServletRequest req) {
+        Result<List<KuaiShouOcpxActionTypeConfig>> result = new Result<>();
+        QueryWrapper<KuaiShouOcpxActionTypeConfig> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouOcpxActionTypeConfig, req.getParameterMap());
+        List<KuaiShouOcpxActionTypeConfig> pageList = kuaiShouOcpxActionTypeConfigService.list(queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param kuaiShouOcpxActionTypeConfig
+     * @return
+     */
+    @AutoLog(value = "转化目标字典表-添加")
+    @ApiOperation(value = "转化目标字典表-添加", notes = "转化目标字典表-添加")
+    @PostMapping(value = "/add")
+    public Result<KuaiShouOcpxActionTypeConfig> add(@RequestBody KuaiShouOcpxActionTypeConfig kuaiShouOcpxActionTypeConfig) {
+        Result<KuaiShouOcpxActionTypeConfig> result = new Result<>();
+        try {
+            kuaiShouOcpxActionTypeConfigService.save(kuaiShouOcpxActionTypeConfig);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param kuaiShouOcpxActionTypeConfig
+     * @return
+     */
+    @AutoLog(value = "转化目标字典表-编辑")
+    @ApiOperation(value = "转化目标字典表-编辑", notes = "转化目标字典表-编辑")
+    @PutMapping(value = "/edit")
+    public Result<KuaiShouOcpxActionTypeConfig> edit(@RequestBody KuaiShouOcpxActionTypeConfig kuaiShouOcpxActionTypeConfig) {
+        Result<KuaiShouOcpxActionTypeConfig> result = new Result<KuaiShouOcpxActionTypeConfig>();
+        KuaiShouOcpxActionTypeConfig kuaiShouOcpxActionTypeConfigEntity = kuaiShouOcpxActionTypeConfigService.getById(kuaiShouOcpxActionTypeConfig.getId());
+        if (kuaiShouOcpxActionTypeConfigEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = kuaiShouOcpxActionTypeConfigService.updateById(kuaiShouOcpxActionTypeConfig);
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "转化目标字典表-通过id删除")
+    @ApiOperation(value = "转化目标字典表-通过id删除", notes = "转化目标字典表-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            kuaiShouOcpxActionTypeConfigService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "转化目标字典表-批量删除")
+    @ApiOperation(value = "转化目标字典表-批量删除", notes = "转化目标字典表-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<KuaiShouOcpxActionTypeConfig> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<KuaiShouOcpxActionTypeConfig> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.kuaiShouOcpxActionTypeConfigService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "转化目标字典表-通过id查询")
+    @ApiOperation(value = "转化目标字典表-通过id查询", notes = "转化目标字典表-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<KuaiShouOcpxActionTypeConfig> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<KuaiShouOcpxActionTypeConfig> result = new Result<>();
+        KuaiShouOcpxActionTypeConfig kuaiShouOcpxActionTypeConfig = kuaiShouOcpxActionTypeConfigService.getById(id);
+        if (kuaiShouOcpxActionTypeConfig == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(kuaiShouOcpxActionTypeConfig);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<KuaiShouOcpxActionTypeConfig> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                KuaiShouOcpxActionTypeConfig kuaiShouOcpxActionTypeConfig = JSON.parseObject(deString, KuaiShouOcpxActionTypeConfig.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouOcpxActionTypeConfig, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<KuaiShouOcpxActionTypeConfig> pageList = kuaiShouOcpxActionTypeConfigService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "转化目标字典表列表");
+        mv.addObject(NormalExcelConstants.CLASS, KuaiShouOcpxActionTypeConfig.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("转化目标字典表列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<KuaiShouOcpxActionTypeConfig> listKuaiShouOcpxActionTypeConfigs = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouOcpxActionTypeConfig.class, params);
+                kuaiShouOcpxActionTypeConfigService.saveBatch(listKuaiShouOcpxActionTypeConfigs);
+                return Result.ok("文件导入成功!数据行数:" + listKuaiShouOcpxActionTypeConfigs.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
+
+}

+ 154 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAccountSpeedExploreLogController.java

@@ -0,0 +1,154 @@
+package org.jeecg.modules.ctop.controller;
+
+import cn.com.ctop.common.module.utils.QueryGenerator;
+import cn.com.ctop.common.module.utils.ResultMapUtils;
+import cn.com.ctop.common.module.utils.StatusCode;
+import cn.com.ctop.kuaishou.modules.ai.entity.KuaishouAccountSpeedExploreLog;
+import cn.com.ctop.kuaishou.modules.ai.service.IKuaishouAccountSpeedExploreLogService;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.vo.LoginUser;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 快手账户加速探索触发记录信息
+ * @author jeecg-boot
+ * @date   2021-03-08
+ * @version V1.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ctop/kuaishouAccountSpeedExploreLog")
+public class KuaishouAccountSpeedExploreLogController {
+	@Autowired
+	private IKuaishouAccountSpeedExploreLogService kuaishouAccountSpeedExploreLogService;
+
+	/**
+	  * 分页列表查询
+	 * @param kuaishouAccountSpeedExploreLog
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@GetMapping(value = "/list")
+	public Result<IPage<KuaishouAccountSpeedExploreLog>> queryPageList(KuaishouAccountSpeedExploreLog kuaishouAccountSpeedExploreLog,
+																	   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+																	   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+																	   HttpServletRequest req) {
+		Result<IPage<KuaishouAccountSpeedExploreLog>> result = new Result<>();
+		QueryWrapper<KuaishouAccountSpeedExploreLog> queryWrapper = QueryGenerator.initQueryWrapper(kuaishouAccountSpeedExploreLog, req.getParameterMap());
+		Page<KuaishouAccountSpeedExploreLog> page = new Page<>(pageNo, pageSize);
+		IPage<KuaishouAccountSpeedExploreLog> pageList = kuaishouAccountSpeedExploreLogService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+
+	/**
+	  *   添加
+	 * @param kuaishouAccountSpeedExploreLog
+	 * @return
+	 */
+	@PostMapping(value = "/open")
+	public Map<String,Object> add(@RequestBody KuaishouAccountSpeedExploreLog kuaishouAccountSpeedExploreLog) {
+		Map<String,Object>result = new HashMap<>();
+		try {
+			LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+			kuaishouAccountSpeedExploreLog.setUserId(user.getId());
+			//1:查询此账户当前是否存在正在加速探索的账户
+			if(null!=kuaishouAccountSpeedExploreLog.getConvertType()&&(kuaishouAccountSpeedExploreLog.getConvertType()==2||kuaishouAccountSpeedExploreLog.getConvertType()==180||kuaishouAccountSpeedExploreLog.getConvertType()==53||kuaishouAccountSpeedExploreLog.getConvertType()==190)){
+				return kuaishouAccountSpeedExploreLogService.openSpeedExplore(kuaishouAccountSpeedExploreLog);
+			}else {
+				ResultMapUtils.setResultMap(result, StatusCode.KUAISHOU_SPEED_EXPLORE_ACTION_TYPE_NOT_CONFIG);
+				return result;
+			}
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			ResultMapUtils.setResultMap(result, StatusCode.COMMON_SERVER_ERROR);
+			return result;
+		}
+	}
+
+	/**
+	  *  编辑
+	 * @param kuaishouAccountSpeedExploreLog
+	 * @return
+	 */
+	@PutMapping(value = "/edit")
+	public Result<KuaishouAccountSpeedExploreLog> edit(@RequestBody KuaishouAccountSpeedExploreLog kuaishouAccountSpeedExploreLog) {
+		Result<KuaishouAccountSpeedExploreLog> result = new Result<>();
+		KuaishouAccountSpeedExploreLog kuaishouAccountSpeedExploreLogEntity = kuaishouAccountSpeedExploreLogService.getById(kuaishouAccountSpeedExploreLog.getId());
+		if(kuaishouAccountSpeedExploreLogEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = kuaishouAccountSpeedExploreLogService.updateById(kuaishouAccountSpeedExploreLog);
+			if(ok) {
+				result.success("修改成功!");
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	  *   通过id删除
+	 * @param id
+	 * @return
+	 */
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+		try {
+			kuaishouAccountSpeedExploreLogService.removeById(id);
+		} catch (Exception e) {
+			log.error("删除失败",e.getMessage());
+			return Result.error("删除失败!");
+		}
+		return Result.ok("删除成功!");
+	}
+
+	/**
+	  *  批量删除
+	 * @param ids
+	 * @return
+	 */
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<KuaishouAccountSpeedExploreLog> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<KuaishouAccountSpeedExploreLog> result = new Result<>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.kuaishouAccountSpeedExploreLogService.removeByIds(Arrays.asList(ids.split(",")));
+			result.success("删除成功!");
+		}
+		return result;
+	}
+
+	/**
+	  * 通过id查询
+	 * @param id
+	 * @return
+	 */
+	@GetMapping(value = "/queryById")
+	public Result<KuaishouAccountSpeedExploreLog> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<KuaishouAccountSpeedExploreLog> result = new Result<>();
+		KuaishouAccountSpeedExploreLog kuaishouAccountSpeedExploreLog = kuaishouAccountSpeedExploreLogService.getById(id);
+		if(kuaishouAccountSpeedExploreLog==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(kuaishouAccountSpeedExploreLog);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+}

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAdvertiserController.java

@@ -1,6 +1,8 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.entity.SysCategory;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.crawler.modules.account.entity.KuaishouAdAccount;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAdAccountService;
@@ -12,9 +14,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
-import org.jeecg.modules.system.entity.SysCategory;
 import org.jeecg.modules.system.service.ISysCategoryService;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAgentAccountController.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.utils.ExportExcelUtils;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouAgentAccount;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouAgentAccountService;
 import com.alibaba.fastjson.JSON;
@@ -13,7 +14,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAppAccountController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.crawler.modules.account.entity.KuaishouAppAccount;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAppAccountService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAppProductController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.app.entity.KuaishouAppProduct;
 import cn.com.ctop.kuaishou.modules.app.service.IKuaishouAppProductService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouChannelRegInfoController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.excel.event.AnalysisEventListener;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -9,7 +10,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.ctop.entity.KuaishouChannelRegInfo;
 import org.jeecg.modules.ctop.service.IKuaishouChannelRegInfoService;
 import org.jeecg.modules.excelutil.ExcelUtils;
@@ -191,7 +191,6 @@ public class KuaishouChannelRegInfoController {
                 fis = (FileInputStream) file.getInputStream();
                 AnalysisEventListener listener = new KuaishouChannelRegInfoExcelListener();
                 Boolean flag = ExcelUtils.readExcel(fis, KuaishouChannelRegInfoEntity.class, listener);
-                System.out.println("导入是否成功:" + flag);
             } catch (Exception e) {
                 e.printStackTrace();
             } finally {

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouEffectAdInfoController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.crawler.modules.kuaishoucce.entity.KuaishouEffectAdInfo;
 import cn.com.ctop.crawler.modules.kuaishoucce.service.IKuaishouEffectAdInfoService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouEffectVideoInfoController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -8,7 +9,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.ctop.entity.KuaishouEffectVideoInfo;
 import org.jeecg.modules.ctop.service.IKuaishouEffectVideoInfoService;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouHotPhotoInfoController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.crawler.modules.kuaishoucce.entity.KuaishouHotPhotoInfo;
 import cn.com.ctop.crawler.modules.kuaishoucce.service.IKuaishouHotPhotoInfoService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouInspiredAdController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.crawler.modules.kuaishoucce.entity.KuaishouInspiredAd;
 import cn.com.ctop.crawler.modules.kuaishoucce.service.IKuaishouInspiredAdService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

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

@@ -1,21 +1,21 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.utils.HttpUtils;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.vo.SheetInfoVo;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouVideoEtlInfo;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouVideoEtlInfoService;
 import com.alibaba.excel.EasyExcelFactory;
 import com.alibaba.excel.ExcelWriter;
 import com.alibaba.excel.metadata.Sheet;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.DateUtils;
-import org.jeecg.modules.excelutil.entity.BytedanceVideoEtlInfoEntity;
 import org.jeecg.modules.excelutil.entity.KuaishouVideoEtlInfoEntity;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -80,7 +80,7 @@ public class KuaishouVideoEtlInfoController {
 				if(null!=endDate&&!"".equals(endDate.trim())){
 					queryWrapper.le("faddish_date",endDate);
 				}
-				queryWrapper.le("faddish_day_num",30);
+				queryWrapper.le("faddish_day_num",14);
 			}else {
 				//上线
 				if(null!=startDate&&!"".equals(startDate.trim())){
@@ -99,6 +99,17 @@ public class KuaishouVideoEtlInfoController {
 		return result;
 	}
 
+	 @PostMapping(value = "/queryPageList")
+	 public Result<Object> queryPageList(@RequestBody JSONObject request) {
+		 try {
+			 return kuaishouVideoEtlInfoService.queryPageList(request);
+		 } catch (Exception e) {
+			 log.error("查询异常,", e.getMessage());
+			 e.printStackTrace();
+		 }
+		 return Result.error("查询失败");
+	 }
+
 	/**
 	  *   添加
 	 * @param kuaishouVideoEtlInfo
@@ -192,7 +203,7 @@ public class KuaishouVideoEtlInfoController {
 			  if(null!=endDate&&!"".equals(endDate.trim())){
 				  queryWrapper.le("faddish_date",endDate);
 			  }
-			  queryWrapper.lt("faddish_day_num",30);
+			  queryWrapper.lt("faddish_day_num",14);
 		  }else {
 			  //上线
 			  if(null!=startDate&&!"".equals(startDate.trim())){

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialAscriptionController.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.MaterialAscription;
 import cn.com.ctop.common.module.service.IMaterialAscriptionService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 23 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialCutFrameController.java

@@ -2,12 +2,12 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.MaterialCutFrame;
-import cn.com.ctop.common.module.entity.MaterialCutFrameTask;
-import cn.com.ctop.common.module.entity.MaterialInfo;
 import cn.com.ctop.common.module.service.IMaterialCutFrameService;
 import cn.com.ctop.common.module.service.IMaterialCutFrameTaskService;
 import cn.com.ctop.common.module.service.IMaterialInfoService;
-import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouVideoGetService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -15,15 +15,14 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
-import java.util.Arrays;
 import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 
 
 /**
@@ -44,6 +43,8 @@ public class MaterialCutFrameController {
     private IMaterialInfoService materialInfoService;
     @Autowired
     private IMaterialCutFrameTaskService materialCutFrameTaskServiceTask;
+    @Autowired
+    private IKuaiShouVideoGetService videoGetService;
 
     /**
      * 分页列表查询
@@ -67,4 +68,18 @@ public class MaterialCutFrameController {
         result.setResult(pageList);
         return result;
     }
+
+    @AutoLog(value = "截屏-查询")
+    @ApiOperation(value = "截屏-查询", notes = "截屏-查询")
+    @GetMapping(value = "/queryByPhotoId")
+    public Result<Object> queryByPhotoId(Long photoId) {
+        try {
+            KuaiShouVideoGet videoGet = videoGetService.getVideoByPhotoId(photoId);
+            List<MaterialCutFrame> list = materialCutFrameService.getListByVideoSignature(videoGet.getSignature());
+            return Result.ok(list);
+        } catch (Exception e) {
+            log.error("queryByPhotoId error", e);
+            return Result.error(e.getMessage());
+        }
+    }
 }

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialImageInfoController.java

@@ -7,6 +7,7 @@ import cn.com.ctop.common.module.mapper.MaterialInfoMapper;
 import cn.com.ctop.common.module.service.IMaterialImageInfoService;
 import cn.com.ctop.common.module.service.IMaterialInfoService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -18,7 +19,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.common.util.oConvertUtils;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialImageVideoInfoController.java

@@ -2,13 +2,13 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.entity.MaterialImageVideoInfo;
 import cn.com.ctop.common.module.service.IMaterialImageVideoInfoService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialInfoController.java

@@ -5,10 +5,7 @@ import cn.com.ctop.common.module.constant.CtopRoleCodeConstant;
 import cn.com.ctop.common.module.entity.*;
 import cn.com.ctop.common.module.enums.MaterialSupplierEnum;
 import cn.com.ctop.common.module.service.*;
-import cn.com.ctop.common.module.utils.Check;
-import cn.com.ctop.common.module.utils.CloudVideoProcessUtil;
-import cn.com.ctop.common.module.utils.JsonUtil;
-import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
+import cn.com.ctop.common.module.utils.*;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouReportDailyMaterialService;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -20,7 +17,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.modules.ctop.service.IProjectMemberService;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialParameterController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.MaterialParameter;
 import cn.com.ctop.common.module.service.IMaterialParameterService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 331 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialReportOverViewController.java

@@ -0,0 +1,331 @@
+package org.jeecg.modules.ctop.controller;
+
+import cn.com.ctop.common.module.utils.CtopAdConstant;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageInfo;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.ctop.mapper.MaterialReportOverViewMapper;
+import org.jeecg.modules.ctop.service.IMaterialReportOverViewService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Created by JQ.bi on 2021.03.02
+ */
+@Slf4j
+@RestController
+@RequestMapping("/overView")
+public class MaterialReportOverViewController {
+
+    @Autowired
+    private IMaterialReportOverViewService materialReportOverViewService;
+
+    @Autowired
+    private MaterialReportOverViewMapper materialReportOverViewMapper;
+
+    /**
+     *  根据userId递归查询下属,默认到最后一级,返回人员参与项目集合
+     */
+    @PostMapping("/getProjects")
+    public Result<Set<JSONObject>> getProjects(@RequestParam String userId, @RequestParam int mediaId) {
+        Result<Set<JSONObject>> result = new Result<>();
+        if(userId.isEmpty()){
+            result.error500("userId is empty");
+            return result;
+        }
+        //查询所有包含自己的下级
+        Set<String> subordinates= materialReportOverViewService.recursiveQuerySubordinate(userId);
+        //查询并返回所有关联的项目
+        result.setResult(materialReportOverViewService.queryProjectBy(subordinates,mediaId));
+        result.setSuccess(true);
+        return result;
+    }
+
+    /**
+     *  根据筛选条件查询总消耗、视频总数、爆款视频、有效视频
+     */
+    @PostMapping("/sumData")
+    public Result<Map<String,Object>> sumData(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String, Object> totalModule = materialReportOverViewService.getTotalModule(params.getInteger("mediaId"),
+                params.getString("startDate"),
+                params.getString("endDate"),
+                params.getJSONArray("projects"));
+        result.setResult(totalModule);
+        result.setSuccess(true);
+        return result;
+    }
+
+    /**
+     *  消耗数据趋势图
+     */
+    @PostMapping("/chartData")
+    public Result<List<JSONObject>> chartData(@RequestBody JSONObject params){
+        Result<List<JSONObject>> result =new Result<>();
+        List<JSONObject> totalChat = materialReportOverViewService.getTotalChat(params.getInteger("mediaId"),
+                params.getString("startDate"),
+                params.getString("endDate"),
+                params.getJSONArray("projects"));
+        result.setResult(totalChat);
+        result.setSuccess(true);
+        return result;
+    }
+
+    /**
+     *  Top素材排行榜
+     */
+    @PostMapping("/materialTop")
+    public Result<List<JSONObject>> materialTop(@RequestBody JSONObject params){
+        Result<List<JSONObject>> result = new Result<>();
+        List<JSONObject> topMaterialList = materialReportOverViewService.getTopMaterialList(params.getInteger("mediaId"),
+                params.getString("startDate"),
+                params.getString("endDate"),
+                params.getJSONArray("projects"));
+        result.setResult(topMaterialList);
+        result.setSuccess(true);
+        return result;
+    }
+
+    /**
+     *  Top素材排行榜查看更多
+     */
+    @PostMapping("/materialTopViewMore")
+    public Result<PageInfo<JSONObject>> materialTopViewMore(@RequestBody JSONObject params){
+        Result<PageInfo<JSONObject>> result = new Result<>();
+        PageInfo<JSONObject> pageInfo = materialReportOverViewService.getTopMaterialList(params.getInteger("mediaId"),
+                params.getString("startDate"),
+                params.getString("endDate"),
+                params.getJSONArray("projects"),
+                params.getString("channelType"),
+                params.getString("md5"),
+                params.getString("target")==null?"cost":params.getString("target"),
+                params.getString("order")==null?"desc":params.getString("order"),
+                params.getInteger("pageNo"),
+                params.getInteger("pageSize")
+                );
+        result.setResult(pageInfo);
+        result.setSuccess(true);
+        return result;
+    }
+
+    /**
+     *  Top素材排行榜查看更多导出报表
+     */
+    @PostMapping("/excel")
+    public void getExcelReport(@RequestBody JSONObject params,
+                               HttpServletRequest request,
+                               HttpServletResponse response) {
+        if (params.getInteger("mediaId") == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
+            materialReportOverViewService.exportBytedanceExcel(params,request,response);
+        } else if (params.getInteger("mediaId") == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
+            materialReportOverViewService.exportKuaishouExcel(params,request,response);
+
+        }
+    }
+
+    /**
+     *  Top设计排行榜
+     */
+    @PostMapping("/designTop")
+    public Result<PageInfo<JSONObject>> designTop(@RequestBody JSONObject params){
+        Result<PageInfo<JSONObject>> result = new Result<>();
+        PageInfo<JSONObject> topMaterialList = materialReportOverViewService.getTopDesignList(
+                params.getString("startDate"),
+                params.getString("endDate"),
+                params.getString("userId"),
+                params.getString("target"),
+                params.getString("order"),
+                params.getInteger("pageSize"),
+                params.getInteger("pageNo"));
+        result.setResult(topMaterialList);
+        result.setSuccess(true);
+        return result;
+    }
+
+    /**
+     *  标签占比饼状图
+     */
+    //TODO 需等标签库重构完
+    @PostMapping("/tagProportionAnalyse")
+    public Result<JSONObject> tagProportionAnalyse(){
+        return null;
+    }
+
+    /**
+     *  素材详情页
+     */
+    @PostMapping("/materialDetailInfo")
+    public Result<JSONObject> materialDetailInfo(@RequestBody JSONObject params){
+        Result<JSONObject> result= new Result<>();
+        result.setResult(materialReportOverViewService.getMaterialDetailInfo(params.getInteger("mediaId"),
+                params.getString("md5")));
+        result.setSuccess(true);
+        return result;
+
+    }
+
+    @PostMapping("/getProjectIdByMd5")
+    public Result<Long> getProjectIdByMd5(@RequestBody JSONObject params){
+        Result<Long> result= new Result<>();
+        if (params.getInteger("mediaId") == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
+            result.setResult(materialReportOverViewMapper.queryBytedanceProjectIdByMd5(params.getString("md5")));
+        } else if (params.getInteger("mediaId") == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
+            result.setResult(materialReportOverViewMapper.queryKuaishouProjectIdByMd5(params.getString("md5")));
+        }
+        result.setSuccess(true);
+        return result;
+    }
+
+    @PostMapping("/materialDetailCost")
+    public Result<Map<String,Object>> materialDetailCost(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("cost",materialReportOverViewMapper.queryBytedanceCostByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailClick")
+    public Result<Map<String,Object>> materialDetailClick(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("click",materialReportOverViewMapper.queryBytedanceClickByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailMaterialShow")
+    public Result<Map<String,Object>> materialDetailMaterialShow(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("materialShow",materialReportOverViewMapper.queryBytedanceMaterialShowByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailPlay100Rate")
+    public Result<Map<String,Object>> materialDetailPlay100Rate(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("play100Rate",materialReportOverViewMapper.queryBytedancePlay100RateByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailLikeMaterial")
+    public Result<Map<String,Object>> materialDetailLikeMaterial(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("likeMaterial",materialReportOverViewMapper.queryBytedanceLikeMaterialByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailCommentMaterial")
+    public Result<Map<String,Object>> materialDetailCommentMaterial(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("commentMaterial",materialReportOverViewMapper.queryBytedanceCommentMaterialByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailShareMaterial")
+    public Result<Map<String,Object>> materialDetailShareMaterial(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("shareMaterial",materialReportOverViewMapper.queryBytedanceShareMaterialByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailFollow")
+    public Result<Map<String,Object>> materialDetailFollow(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("follow",materialReportOverViewMapper.queryBytedanceFollowByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailCharge")
+    public Result<Map<String,Object>> materialDetailCharge(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("charge",materialReportOverViewMapper.queryKuaishouChargeByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailPhotoShow")
+    public Result<Map<String,Object>> materialDetailPhotoShow(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("photoShow",materialReportOverViewMapper.queryKuaishouPhotoShowByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailPhotoClick")
+    public Result<Map<String,Object>> materialDetailPhotoClick(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("photoClick",materialReportOverViewMapper.queryKuaishouPhotoClickByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailAClick")
+    public Result<Map<String,Object>> materialDetailAClick(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("aclick",materialReportOverViewMapper.queryKuaishouAClickByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailBClick")
+    public Result<Map<String,Object>> materialDetailBClick(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("bclick",materialReportOverViewMapper.queryKuaishouBClickByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailActivation")
+    public Result<Map<String,Object>> materialDetailActivation(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("activation",materialReportOverViewMapper.queryKuaishouActivationByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+    @PostMapping("/materialDetailPlay3sRate")
+    public Result<Map<String,Object>> materialDetailPlay3sRate(@RequestBody JSONObject params){
+        Result<Map<String,Object>> result= new Result<>();
+        Map<String,Object> map = new HashMap<>();
+        map.put("play3sRate",materialReportOverViewMapper.queryKuaishouPlay3sRateByMd5(params.getString("md5"),params.getLong("projectId")));
+        result.setResult(map);
+        result.setSuccess(true);
+        return result;
+    }
+
+    @PostMapping("/materialDetailChat")
+    public Result<List<JSONObject>> materialDetailChat(@RequestBody JSONObject params){
+        Result<List<JSONObject>> result= new Result<>();
+        result.setResult(materialReportOverViewService.getMaterialDetailChat(params.getInteger("mediaId"),
+                params.getString("md5")));
+        result.setSuccess(true);
+        return result;
+    }
+}

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialTagController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.MaterialTag;
 import cn.com.ctop.common.module.service.IMaterialTagService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialTagInfoController.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.entity.MaterialTagInfo;
 import cn.com.ctop.common.module.service.IMaterialTagInfoService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -11,7 +12,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;

+ 1 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialVideoAuthorController.java

@@ -2,13 +2,12 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.material.entity.MaterialVideoAuthor;
 import cn.com.ctop.common.module.material.service.IMaterialVideoAuthorService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

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

@@ -1,22 +1,19 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-
-import javax.servlet.http.HttpServletRequest;
-
 import cn.com.ctop.common.module.material.entity.MaterialVideoCover;
 import cn.com.ctop.common.module.material.service.IMaterialVideoCoverService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
 
  /**
  * 视频素材封面信息

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

@@ -1,20 +1,18 @@
 package org.jeecg.modules.ctop.controller;
 
-import javax.servlet.http.HttpServletRequest;
-
 import cn.com.ctop.common.module.material.entity.MaterialVideoFrame;
 import cn.com.ctop.common.module.material.service.IMaterialVideoFrameService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-
 import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
+
  /**
  * 视频素材截帧信息
  */

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

@@ -1,20 +1,18 @@
 package org.jeecg.modules.ctop.controller;
 
-import javax.servlet.http.HttpServletRequest;
-
 import cn.com.ctop.common.module.material.entity.MaterialVideoInfo;
 import cn.com.ctop.common.module.material.service.IMaterialVideoInfoService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-
 import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
+
  /**
  * 视频素材基础信息
  */

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

@@ -1,21 +1,19 @@
 package org.jeecg.modules.ctop.controller;
 
-import javax.servlet.http.HttpServletRequest;
-
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.material.entity.MaterialVideoProject;
 import cn.com.ctop.common.module.material.service.IMaterialVideoProjectService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
 
  /**
  * 视频素材关联项目信息

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

@@ -1,21 +1,18 @@
 package org.jeecg.modules.ctop.controller;
 
-import javax.servlet.http.HttpServletRequest;
-
 import cn.com.ctop.common.module.material.entity.MaterialVideoWatermark;
 import cn.com.ctop.common.module.material.service.IMaterialVideoWatermarkService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-
 import lombok.extern.slf4j.Slf4j;
-
-
+import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
+
  /**
  * 视频素材水印信息
  */

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MusicKuaishouTypeController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.ctop.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.crawler.modules.music.entity.MusicKuaishouType;
 import cn.com.ctop.crawler.modules.music.service.IMusicKuaishouTypeService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -8,7 +9,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 246 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/OauthConfigController.java

@@ -0,0 +1,246 @@
+package org.jeecg.modules.ctop.controller;
+
+import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.entity.OauthConfig;
+import cn.com.ctop.common.module.service.IOauthConfigService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 授权配置信息
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-01-26
+ */
+@Slf4j
+@Api(tags = "授权配置信息")
+@RestController
+@RequestMapping("/auth/oauthConfig")
+public class OauthConfigController {
+    @Autowired
+    private IOauthConfigService oauthConfigService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param oauthConfig
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "授权配置信息-分页列表查询")
+    @ApiOperation(value = "授权配置信息-分页列表查询", notes = "授权配置信息-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<List<OauthConfig>> queryPageList(OauthConfig oauthConfig,
+                                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                   HttpServletRequest req) {
+        Result<List<OauthConfig>> result = new Result<>();
+        QueryWrapper<OauthConfig> queryWrapper = QueryGenerator.initQueryWrapper(oauthConfig, req.getParameterMap());
+        queryWrapper.orderByAsc("agent_rank");
+        List<OauthConfig> pageList = oauthConfigService.list(queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param oauthConfig
+     * @return
+     */
+    @AutoLog(value = "授权配置信息-添加")
+    @ApiOperation(value = "授权配置信息-添加", notes = "授权配置信息-添加")
+    @PostMapping(value = "/add")
+    public Result<OauthConfig> add(@RequestBody OauthConfig oauthConfig) {
+        Result<OauthConfig> result = new Result<>();
+        try {
+            oauthConfigService.save(oauthConfig);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param oauthConfig
+     * @return
+     */
+    @AutoLog(value = "授权配置信息-编辑")
+    @ApiOperation(value = "授权配置信息-编辑", notes = "授权配置信息-编辑")
+    @PutMapping(value = "/edit")
+    public Result<OauthConfig> edit(@RequestBody OauthConfig oauthConfig) {
+        Result<OauthConfig> result = new Result<OauthConfig>();
+        OauthConfig oauthConfigEntity = oauthConfigService.getById(oauthConfig.getId());
+        if (oauthConfigEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = oauthConfigService.updateById(oauthConfig);
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "授权配置信息-通过id删除")
+    @ApiOperation(value = "授权配置信息-通过id删除", notes = "授权配置信息-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            oauthConfigService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "授权配置信息-批量删除")
+    @ApiOperation(value = "授权配置信息-批量删除", notes = "授权配置信息-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<OauthConfig> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<OauthConfig> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.oauthConfigService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "授权配置信息-通过id查询")
+    @ApiOperation(value = "授权配置信息-通过id查询", notes = "授权配置信息-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<OauthConfig> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<OauthConfig> result = new Result<>();
+        OauthConfig oauthConfig = oauthConfigService.getById(id);
+        if (oauthConfig == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(oauthConfig);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<OauthConfig> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                OauthConfig oauthConfig = JSON.parseObject(deString, OauthConfig.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(oauthConfig, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<OauthConfig> pageList = oauthConfigService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "授权配置信息列表");
+        mv.addObject(NormalExcelConstants.CLASS, OauthConfig.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("授权配置信息列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<OauthConfig> listOauthConfigs = ExcelImportUtil.importExcel(file.getInputStream(), OauthConfig.class, params);
+                oauthConfigService.saveBatch(listOauthConfigs);
+                return Result.ok("文件导入成功!数据行数:" + listOauthConfigs.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
+
+}

+ 2 - 2
module-common/src/main/java/cn/com/ctop/common/module/controller/ProductController.java

@@ -1,4 +1,4 @@
-package cn.com.ctop.common.module.controller;
+package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.Product;
@@ -7,6 +7,7 @@ import cn.com.ctop.common.module.mapper.ProjectMapper;
 import cn.com.ctop.common.module.service.IProductService;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -15,7 +16,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

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

@@ -2,10 +2,14 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.constant.CtopRoleCodeConstant;
-import cn.com.ctop.common.module.entity.*;
+import cn.com.ctop.common.module.entity.Advertiser;
+import cn.com.ctop.common.module.entity.MaterialInfo;
+import cn.com.ctop.common.module.entity.Project;
+import cn.com.ctop.common.module.entity.SysUser;
 import cn.com.ctop.common.module.mapper.ProjectMapper;
 import cn.com.ctop.common.module.service.*;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -14,7 +18,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.ctop.entity.ProjectMember;
 import org.jeecg.modules.ctop.entity.TransferAccount;
@@ -22,8 +25,6 @@ import org.jeecg.modules.ctop.mapper.ProjectMemberMapper;
 import org.jeecg.modules.ctop.service.IAdvertiserService;
 import org.jeecg.modules.ctop.service.IProjectMemberService;
 import org.jeecg.modules.ctop.service.ITransferAccountService;
-import org.jeecg.modules.system.service.ISysCategoryService;
-import org.jeecg.modules.system.service.ISysUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -198,28 +199,13 @@ public class ProjectController {
             pageList = projectService.page(page, queryWrapper);
         }
         List<Project> records = pageList.getRecords();
-        if (!Check.isNull(records)) {
-            if (!Check.isNull(records)) {
-                for (Project project2 : records) {
-                    QueryWrapper<TransferAccount> transferAccountQueryWrapper = new QueryWrapper<>();
-                    transferAccountQueryWrapper.eq("project_id", project2.getId());
-                    transferAccountQueryWrapper.eq("status", 0);
-                    List<TransferAccount> list = transferAccountService.list(transferAccountQueryWrapper);
-                    project2.setNeedExamine(list.size());
-                }
-
-            }
-        }
+        records = transferAccountService.getTransferInfoListByList(records);
+        pageList.setRecords(records);
         result.setResult(pageList);
         return result;
     }
 
 
-    @Autowired
-    private ISysCategoryService sysCategoryService;
-    @Autowired
-    private ISupplierListService supplierListService;
-
     /**
      * 分页列表查询
      *
@@ -237,11 +223,8 @@ public class ProjectController {
                                                 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                 HttpServletRequest req) {
         Result<IPage<Project>> result = new Result<>();
-
         String projectName = project.getProjectName();
         project.setProjectName(null);
-
-
         QueryWrapper<Project> queryWrapper = QueryGenerator.initQueryWrapper(project, req.getParameterMap());
         Page<Project> page = new Page<>(pageNo, pageSize);
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -252,30 +235,14 @@ public class ProjectController {
         } else if ("plane".equals(roleCode) || "plan".equals(roleCode) || "shot".equals(roleCode) || "clip".equals(roleCode) || "designTeamLeader".equals(roleCode) || "planeLeader".equals(roleCode)) {
             queryWrapper.eq("design_responsible_id", sysUser.getId());
         }
-
         if (!Check.isNull(projectName)) {
             queryWrapper.like("project_name", projectName);
         }
         queryWrapper.orderByDesc("create_time");
-
         IPage<Project> pageList = projectService.page(page, queryWrapper);
         List<Project> records = pageList.getRecords();
-        if (!Check.isNull(records)) {
-            for (Project project1 : records) {
-                if (!Check.isNull(project1.getSupplierCode())) {
-                    QueryWrapper<SupplierList> supplierListQueryWrapper = new QueryWrapper<>();
-                    supplierListQueryWrapper.eq("supplier_code", project1.getSupplierCode());
-                    supplierListQueryWrapper.last("limit 1");
-                    SupplierList one = supplierListService.getOne(supplierListQueryWrapper);
-                    if (!Check.isNull(one)) {
-                        project1.setSupplierCode_dictText(one.getSupplierName());
-                    }
-                }
-
-
-            }
-
-        }
+        records = transferAccountService.getTransferInfoListByList(records);
+        pageList.setRecords(records);
         result.setSuccess(true);
         result.setResult(pageList);
         return result;

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

@@ -4,11 +4,9 @@ import cn.com.ctop.common.module.entity.Advertiser;
 import cn.com.ctop.common.module.entity.Product;
 import cn.com.ctop.common.module.entity.Project;
 import cn.com.ctop.common.module.entity.SysUser;
-import cn.com.ctop.common.module.service.IProductService;
-import cn.com.ctop.common.module.service.IProjectService;
-import cn.com.ctop.common.module.service.ISysRoleExtService;
-import cn.com.ctop.common.module.service.IUserAllocationService;
+import cn.com.ctop.common.module.service.*;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.ResultMapUtils;
 import cn.com.ctop.common.module.utils.StatusCode;
 import com.alibaba.fastjson.JSONArray;
@@ -20,29 +18,16 @@ import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.ctop.entity.ProjectMember;
 import org.jeecg.modules.ctop.mapper.ProjectMemberMapper;
 import org.jeecg.modules.ctop.service.IAdvertiserService;
 import org.jeecg.modules.ctop.service.IProjectMemberService;
-import org.jeecg.modules.system.service.ISysUserService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 项目成员
@@ -174,15 +159,14 @@ public class ProjectMemberController {
             }
             List<Integer> mediaIds = new ArrayList<>();
             String type = requestJson.getString("type");
-            if ("kuaishou".equals(type)) {
-                mediaIds.add(2);
-                mediaIds.add(4);
-            } else if ("bytedance".equals(type)) {
-                mediaIds.add(1);
-                mediaIds.add(3);
-            }
-            if (Check.isNull(mediaIds)) {
-                throw new Exception("请选择媒体类型");
+            if (!Check.isNull(type)) {
+                if ("kuaishou".equals(type)) {
+                    mediaIds.add(2);
+                    mediaIds.add(4);
+                } else if ("bytedance".equals(type)) {
+                    mediaIds.add(1);
+                    mediaIds.add(3);
+                }
             }
             String roleCode = sysRoleService.getRoleCodeByUserId(userId);
             if ("admin".equals(roleCode) || roleCode.contains("sale") || "meidaManager".equals(roleCode)) {
@@ -191,9 +175,10 @@ public class ProjectMemberController {
             List<JSONObject> projectList = projectMemberService.getProjectByUserIdAndMediaIds(userId, mediaIds);
             List<JSONObject> haveList = new ArrayList<>();
             if (!Check.isNull(projectList)) {
+                Map<Long, List<JSONObject>> accountMap = userAllocationService.getAccountListByProjectList(projectList);
                 for (int i = 0; i < projectList.size(); i++) {
                     JSONObject project = projectList.get(i);
-                    List<JSONObject> accountList = userAllocationService.getAccountListByProject(project.getLong("projectId"));
+                    List<JSONObject> accountList = accountMap.get(project.getLong("projectId"));
                     if (!Check.isNull(accountList)) {
                         project.put("accountList", accountList);
                         haveList.add(project);
@@ -264,47 +249,19 @@ public class ProjectMemberController {
         }
         queryWrapper.groupBy("project_id");
         queryWrapper.orderByDesc("create_time");
-
-
         Page<ProjectMember> page = new Page<>(pageNo, pageSize);
         IPage<ProjectMember> pageList = projectMemberService.page(page, queryWrapper);
         List<ProjectMember> projectMembers = pageList.getRecords();
-        List<ProjectMember> projectMemberList = new ArrayList<>();
-        if (!Check.isNull(projectMembers)) {
-            for (ProjectMember member : projectMembers) {
-                if (Check.isNull(member)) {
-                    continue;
-                }
-                Project project = projectService.getById(member.getProjectId());
-                if (!Check.isNull(project)) {
-                    SysUser responsible = sysUserService.getById(project.getResponsibleId());
-                    member.setResponsibleName(responsible.getRealname());
-                    SysUser designResponsible = sysUserService.getById(project.getDesignResponsibleId());
-                    member.setDesignResponsibleName(designResponsible.getRealname());
-                    Advertiser advertiser = advertiserService.getById(project.getAdvertiserId());
-                    member.setProjectName(project.getProjectName());
-                    Product product = productService.getById(project.getProductId());
-                    if (!Check.isNull(product)) {
-                        member.setProductId(product.getId());
-                        member.setProductName(product.getProductName());
-                    }
-                    member.setAdvertiserName(advertiser.getName());
-                    member.setAdvertiserId(project.getAdvertiserId());
-                    member.setAdvertiserId(project.getAdvertiserId());
-                    member.setMediaId(project.getMediaId());
-                    member.setMaxBid(project.getMaxBid());
-                    projectMemberList.add(member);
-                }
-            }
-        }
-
-
+        projectMembers = projectMemberService.getMapsByProjectList(projectMembers);
+        pageList.setRecords(projectMembers);
         result.setSuccess(true);
         result.setResult(pageList);
         return result;
     }
 
 
+
+
     /**
      * 分页列表查询
      *
@@ -596,9 +553,5 @@ public class ProjectMemberController {
 
     }
 
-    public static void main(String[] args) {
-
-    }
-
 
 }

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectTransferRecordController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.ResultMapUtils;
 import cn.com.ctop.common.module.utils.StatusCode;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -11,7 +12,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.ctop.entity.ProjectTransferRecord;
 import org.jeecg.modules.ctop.service.IProjectTransferRecordService;

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

@@ -2,14 +2,16 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
-import cn.com.ctop.manage.modules.actor.entity.*;
-import cn.com.ctop.manage.modules.actor.service.*;
+import cn.com.ctop.common.module.utils.QueryGenerator;
+import cn.com.ctop.manage.modules.actor.entity.Prop;
+import cn.com.ctop.manage.modules.actor.entity.PropPhoto;
+import cn.com.ctop.manage.modules.actor.service.IPropPhotoService;
+import cn.com.ctop.manage.modules.actor.service.IPropService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ReleaseRecordController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -8,7 +9,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.ctop.entity.ReleaseRecord;
 import org.jeecg.modules.ctop.service.IReleaseRecordService;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ReleaseViewRecordController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -10,7 +11,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.ctop.entity.ReleaseViewRecord;
 import org.jeecg.modules.ctop.service.IReleaseViewRecordService;

+ 2 - 2
module-common/src/main/java/cn/com/ctop/common/module/controller/RuleDataAccountController.java

@@ -1,7 +1,8 @@
-package cn.com.ctop.common.module.controller;
+package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.entity.RuleDataAccount;
 import cn.com.ctop.common.module.service.IRuleDataAccountService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 2 - 2
module-common/src/main/java/cn/com/ctop/common/module/controller/RuleDataCreativeController.java

@@ -1,7 +1,8 @@
-package cn.com.ctop.common.module.controller;
+package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.entity.RuleDataCreative;
 import cn.com.ctop.common.module.service.IRuleDataCreativeService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -9,7 +10,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 2 - 2
module-common/src/main/java/cn/com/ctop/common/module/controller/RuleDataPlanController.java

@@ -1,7 +1,8 @@
-package cn.com.ctop.common.module.controller;
+package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.entity.RuleDataPlan;
 import cn.com.ctop.common.module.service.IRuleDataPlanService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -9,7 +10,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 2 - 2
module-common/src/main/java/cn/com/ctop/common/module/controller/RuleDataTargetController.java

@@ -1,7 +1,8 @@
-package cn.com.ctop.common.module.controller;
+package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.entity.RuleDataTarget;
 import cn.com.ctop.common.module.service.IRuleDataTargetService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -9,7 +10,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SalePerformanceDetailController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -9,7 +10,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.performance.entity.SalePerformanceDetail;
 import org.jeecg.modules.performance.service.ISalePerformanceDetailService;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ScriptTagInfoController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -8,7 +9,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.ctop.entity.ScriptTagInfo;
 import org.jeecg.modules.ctop.service.IScriptTagInfoService;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SupplierListController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.SupplierList;
 import cn.com.ctop.common.module.service.ISupplierListService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SupplierWatermarkController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.SupplierWatermark;
 import cn.com.ctop.common.module.service.ISupplierWatermarkService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SyncDataController.java

@@ -1,11 +1,11 @@
 package org.jeecg.modules.ctop.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.crawler.modules.account.entity.KuaishouAppAccount;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAppAccountService;
 import cn.com.ctop.kuaishou.modules.app.service.IKuaishouAppService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;

+ 18 - 28
module-common/src/main/java/cn/com/ctop/common/module/message/controller/SysMessageController.java

@@ -1,31 +1,21 @@
-package cn.com.ctop.common.module.message.controller;
+package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.base.controller.JeecgController;
-import org.jeecg.common.system.query.QueryGenerator;
 import cn.com.ctop.common.module.message.entity.SysMessage;
 import cn.com.ctop.common.module.message.service.ISysMessageService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.servlet.ModelAndView;
-
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-
 import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.ads.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
 
 /**
  * @Description: 消息
@@ -42,7 +32,7 @@ public class SysMessageController extends JeecgController<SysMessage, ISysMessag
 
 	/**
 	 * 分页列表查询
-	 * 
+	 *
 	 * @param sysMessage
 	 * @param pageNo
 	 * @param pageSize
@@ -60,7 +50,7 @@ public class SysMessageController extends JeecgController<SysMessage, ISysMessag
 
 	/**
 	 * 添加
-	 * 
+	 *
 	 * @param sysMessage
 	 * @return
 	 */
@@ -72,12 +62,12 @@ public class SysMessageController extends JeecgController<SysMessage, ISysMessag
 
 	/**
 	 * 编辑
-	 * 
+	 *
 	 * @param sysMessage
 	 * @return
 	 */
 	@PutMapping(value = "/edit")
-	public Result<?> edit(@RequestBody SysMessage sysMessage) {	
+	public Result<?> edit(@RequestBody SysMessage sysMessage) {
 		sysMessageService.updateById(sysMessage);
         return Result.ok("修改成功!");
 
@@ -85,7 +75,7 @@ public class SysMessageController extends JeecgController<SysMessage, ISysMessag
 
 	/**
 	 * 通过id删除
-	 * 
+	 *
 	 * @param id
 	 * @return
 	 */
@@ -97,7 +87,7 @@ public class SysMessageController extends JeecgController<SysMessage, ISysMessag
 
 	/**
 	 * 批量删除
-	 * 
+	 *
 	 * @param ids
 	 * @return
 	 */
@@ -110,7 +100,7 @@ public class SysMessageController extends JeecgController<SysMessage, ISysMessag
 
 	/**
 	 * 通过id查询
-	 * 
+	 *
 	 * @param id
 	 * @return
 	 */

+ 18 - 28
module-common/src/main/java/cn/com/ctop/common/module/message/controller/SysMessageTemplateController.java

@@ -1,35 +1,25 @@
-package cn.com.ctop.common.module.message.controller;
+package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.base.controller.JeecgController;
-import org.jeecg.common.system.query.QueryGenerator;
 import cn.com.ctop.common.module.message.entity.MsgParams;
 import cn.com.ctop.common.module.message.entity.SysMessageTemplate;
 import cn.com.ctop.common.module.message.service.ISysMessageTemplateService;
 import cn.com.ctop.common.module.message.util.PushMsgUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.servlet.ModelAndView;
-
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-
 import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.ads.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.Map;
 
 /**
  * @Description: 消息模板
@@ -48,7 +38,7 @@ public class SysMessageTemplateController extends JeecgController<SysMessageTemp
 
 	/**
 	 * 分页列表查询
-	 * 
+	 *
 	 * @param sysMessageTemplate
 	 * @param pageNo
 	 * @param pageSize
@@ -66,7 +56,7 @@ public class SysMessageTemplateController extends JeecgController<SysMessageTemp
 
 	/**
 	 * 添加
-	 * 
+	 *
 	 * @param sysMessageTemplate
 	 * @return
 	 */
@@ -78,7 +68,7 @@ public class SysMessageTemplateController extends JeecgController<SysMessageTemp
 
 	/**
 	 * 编辑
-	 * 
+	 *
 	 * @param sysMessageTemplate
 	 * @return
 	 */
@@ -90,7 +80,7 @@ public class SysMessageTemplateController extends JeecgController<SysMessageTemp
 
 	/**
 	 * 通过id删除
-	 * 
+	 *
 	 * @param id
 	 * @return
 	 */
@@ -102,7 +92,7 @@ public class SysMessageTemplateController extends JeecgController<SysMessageTemp
 
 	/**
 	 * 批量删除
-	 * 
+	 *
 	 * @param ids
 	 * @return
 	 */
@@ -114,7 +104,7 @@ public class SysMessageTemplateController extends JeecgController<SysMessageTemp
 
 	/**
 	 * 通过id查询
-	 * 
+	 *
 	 * @param id
 	 * @return
 	 */

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TagInfoController.java

@@ -5,6 +5,7 @@ import cn.com.ctop.common.module.entity.TagInfo;
 import cn.com.ctop.common.module.model.TagInfoTreeModel;
 import cn.com.ctop.common.module.service.ITagCategoryInfoService;
 import cn.com.ctop.common.module.service.ITagInfoService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -12,7 +13,6 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.system.model.TagInfoTree;

+ 285 - 335
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.entity.*;
 import cn.com.ctop.common.module.mapper.CtopOauthTokenMapper;
+import cn.com.ctop.common.module.mapper.UserAllocationMapper;
 import cn.com.ctop.common.module.service.*;
 import cn.com.ctop.common.module.utils.*;
 import cn.com.ctop.common.module.vo.ResFileDTO;
@@ -11,15 +12,18 @@ import cn.com.ctop.crawler.modules.douyin.service.DouyinMusicService;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouTemplate;
 import cn.com.ctop.kuaishou.modules.batch.service.*;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
-import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
+import cn.com.ctop.kuaishou.modules.material.entity.KuaishouAccessToken;
+import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResultToken;
+import cn.com.ctop.kuaishou.modules.report.service.*;
+import cn.com.ctop.toutiao.modules.link.service.IETLReportBytedanceVideoService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.modules.material.service.IBytedanceEffectVideoInfoService;
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceAccountReportTaskRecord;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMaterialDailyMapper;
 import cn.com.ctop.toutiao.modules.report.service.*;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.xxl.job.core.context.XxlJobHelper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
@@ -28,12 +32,16 @@ import org.jeecg.common.util.DateUtils;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+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.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import java.io.IOException;
 import java.io.InputStream;
+import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -50,7 +58,7 @@ import static org.jeecg.common.util.DateUtils.getAnotherDay;
 @RequestMapping("/test")
 @Slf4j
 public class TestController {
-    @Autowired
+    @Resource
     private CtopOauthTokenMapper tokenMapper;
     @Autowired
     private IKuaishouInterfaceService kuaishouInterfaceService;
@@ -63,8 +71,6 @@ public class TestController {
     @Autowired
     private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
     @Autowired
-    private CtopOauthTokenMapper oauthTokenMapper;
-    @Autowired
     private IKuaiShouHistoryReportTaskService historyReportTaskService;
     @Autowired
     private IMaterialInfoService materialInfoService;
@@ -77,8 +83,6 @@ public class TestController {
     @Autowired
     private IMaterialImageInfoService iMaterialImageInfoService;
     @Autowired
-    private IBytedanceReportService bytedanceReportService;
-    @Autowired
     private IKuaishouInterfaceService2 kuaishouInterfaceService2;
     @Autowired
     private IUserAllocationService userAllocationService;
@@ -102,18 +106,187 @@ public class TestController {
     private IBytedanceAccountReportTaskRecordService reportTaskRecordService;
     @Resource
     private BytedanceReportMaterialDailyMapper bytedanceReportMaterialDailyMapper;
+    @Autowired
+    private ICtopOauthTokenService ctopOauthTokenService;
+
+    @Autowired
+    private IBindAccountAuthService bindAccountAuthService;
+    @Resource
+    private UserAllocationMapper allocationMapper;
+    @Autowired
+    private IBytedanceReportService bytedanceReportService;
+
+    @Autowired
+    private IUserAllocationService allocationService;
+    @Autowired
+    private IEtlKuaiShouNewlyService kuaiShouNewlyService;
+    static ExecutorService materialExecutorService = Executors.newFixedThreadPool(8);
+
+    @Autowired
+    private ICtopOauthTokenService tokenService;
+    @Autowired
+    private IEtlKuaiShouGroupDailyReportService etlKuaiShouGroupDailyReportService;
+    @Autowired
+    private IEtlKuaiShouAccountMaterialOverviewService accountMaterialOverviewService;
+
+    @Autowired
+    private IEtlKuaiShouNewlyService newlyService;
+    @Autowired
+    private IKuaishouReportDailyGroupService reportDailyGroupService;
+
+
+    @GetMapping("/cleanNewlyData")
+    public void cleanNewlyData(String startDate, String endDate) throws ParseException {
+
+
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date parse1 = simpleDateFormat.parse(startDate);
+        Date parse2 = simpleDateFormat.parse(endDate);
+     /*   CtopOauthToken token = new CtopOauthToken();
+        token.setAccountId(9791267L);
+        token.setAccessToken("b8ab3b361cd30339ef7e18dcc1305123");*/
+
+        List<CtopOauthToken> ctopOauthTokens = tokenService.selectKuaiShouToken();
+        // kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate, getDate, "adScene");
+        ctopOauthTokens.forEach(token -> executorService.submit(() -> {
+            kuaishouInterfaceService.getAdvertiserReportDaily(token, parse1, parse2, "adScene");
+        }));
+
+
+    }
+
+    @GetMapping("/getVideoByProjectId")
+    public String getVideoByProjectId(Long projectId) {
+        QueryWrapper<UserAllocation> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("project_id", projectId);
+        List<UserAllocation> list = allocationService.list(queryWrapper);
+        for (UserAllocation allocation : list) {
+            CtopOauthToken token = tokenService.getTokenByAccountId(allocation.getAccountId());
+            kuaishouInterfaceService.getVideoList(token, null, null);
+        }
+        return "success";
+    }
+
+
+    @GetMapping("/testKuaishou")
+    public String kuaishouCallback(@RequestParam("auth_code") String authCode, @RequestParam("state") String state) {
+        try {
+            JSONObject json = JSONObject.parseObject(state);
+            if (Check.isNull(json)) {
+                throw new Exception("回调信息为空");
+            }
+            log.info("快手授权返回信息:{}", json);
+            log.info("快手授权返回oauthCode:{}", authCode);
+            Integer agentType = json.getInteger("agentType");
+            Long appId = json.getLong("appId");
+            if (org.apache.commons.lang.StringUtils.isNotBlank(authCode)) {
+                KuaishouResultToken accessToken = kuaishouInterfaceService.getAccessToken(authCode, appId);
+                if (accessToken.getCode() != 0) {
+                    throw new Exception("快手回调token返回错误");
+                }
+                KuaishouAccessToken token = accessToken.getData();
+                if (token != null) {
+                    Long accountId = token.getAccountId();
+                    if (Check.isNull(accountId)) {
+                        return "授权绑定失败!";
+                    }
+                    Map<String, Object> advertiseBaseInfoMap = kuaishouInterfaceService.advertiserInfo(accountId, token.getAccessToken());
+                    if ((Integer) advertiseBaseInfoMap.get("code") != 0) {
+                        return "授权绑定失败,失败原因:" + advertiseBaseInfoMap.get("message");
+                    }
+                    String advertiserId = json.getString("advertiserId");
+                    //指定分配人姓名
+                    String userName = json.getString("userName");
+                    // 媒体类型: 1 头条 2 快手
+                    String mediaId = json.getString("mediaId");
+                    //创建人
+                    String userId = json.getString("userId");
+                    Long projectId = json.getLong("projectId");
+                    BigDecimal warningProportion = json.getBigDecimal("WarningProportion");
+                    BigDecimal warningAmount = json.getBigDecimal("WarningAmount");
+                    String systemType = json.getString("systemType");
+                    CtopOauthToken topOauthToken = new CtopOauthToken();
+                    topOauthToken.setId(String.valueOf(accountId));
+                    topOauthToken.setAppId(json.getLong("appId"));
+                    topOauthToken.setAccountId(accountId);
+                    topOauthToken.setMediaId("2");
+                    topOauthToken.setAdvertiserId(advertiserId);
+                    topOauthToken.setAgentType(agentType);
+                    topOauthToken.setAccessToken(token.getAccessToken());
+                    long accessTokenExpireIn = token.getAccessTokenExpiresIn() * 1000L;
+                    long now = System.currentTimeMillis();
+                    Date accessTokenExpireInDate = new Date(now + accessTokenExpireIn);
+                    topOauthToken.setAccessTokenExpiresIn(accessTokenExpireInDate);
+                    topOauthToken.setRefreshToken(token.getRefreshToken());
+                    long refreshTokenExpireIn = token.getRefreshTokenExpiresIn() * 1000L;
+                    Date refreshTokenExpireInDate = new Date(now + refreshTokenExpireIn);
+                    topOauthToken.setRefreshTokenExpiresIn(refreshTokenExpireInDate);
+                    topOauthToken.setUpdateTime(new Date());
+                    ctopOauthTokenService.saveOrUpdate(topOauthToken);
+                    QueryWrapper<UserAllocation> userAllocationQueryWrapper = new QueryWrapper<>();
+                    userAllocationQueryWrapper.eq("account_id", accountId);
+                    userAllocationQueryWrapper.eq("media_id", 2);
+                    userAllocationQueryWrapper.orderByDesc("create_time");
+                    userAllocationQueryWrapper.last("limit 1");
+                    UserAllocation checkUserAllocation = allocationMapper.selectOne(userAllocationQueryWrapper);
+                    if (!Check.isNull(checkUserAllocation)) {
+                        return "授权失败,该账号已被:" + checkUserAllocation.getUserName() + " 绑定!";
+                    }
+                    UserAllocation userAllocation = new UserAllocation();
+                    userAllocation.setUserName(userName);
+                    userAllocation.setUserId(userId);
+                    userAllocation.setAdvertiserId(advertiserId);
+                    userAllocation.setSystemType(systemType);
+                    // 获取快手昵称
+                    userAllocation.setAuthName((String) advertiseBaseInfoMap.get("userName"));
+                    userAllocation.setMediaId(mediaId);
+                    userAllocation.setAccountId(accountId);
+                    userAllocation.setProjectId(projectId);
+                    userAllocation.setWarningProportion(warningProportion);
+                    userAllocation.setWarningAmount(warningAmount);
+                    userAllocation.setCreateTime(new Date());
+                    userAllocation.setUpdateTime(new Date());
+                    allocationMapper.deleteById(userAllocation.getId());
+                    Map<String, Object> deleteUserMap = new HashMap<>();
+                    deleteUserMap.put("advertiser_id", advertiserId);
+                    deleteUserMap.put("account_id", accountId);
+                    allocationMapper.deleteByMap(deleteUserMap);
+                    int i = allocationMapper.insert(userAllocation);
+                    if (i > 0) {
+                        log.info("同步分配用户表完成,task_id:{},accountId:{}", state, accountId);
+                    }
+                    //账号绑定
+                    bindAccountAuthService.addBindAccount(accountId, KuaishouInterfaceConstant.LOGIN_TYPE_KUAISHOU, advertiserId);
+                    Thread t = new Thread() {
+                        @Override
+                        public void run() {
+                            try {
+                                kuaishouInterfaceService.loadKuaishouDataSingle(topOauthToken);
+                            } catch (ParseException e) {
+                                e.printStackTrace();
+                            }
+                        }
+                    };
+                    t.start();
+                }
+                return "授权绑定成功";
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "授权绑定失败!";
+    }
+
 
     @GetMapping("/getBytedanceMatReport")
-    public Map<String,Object>getData(){
-        List<BytedanceAccountReportTaskRecord>  records = reportTaskRecordService.listByParams(100,"ACCOUNT_DAILY");
-        executorService = Executors.newFixedThreadPool(1);
-        CountDownLatch countDownLatch = new CountDownLatch(records.size());
-        records.forEach(record -> executorService.submit(() -> {
+    public Map<String, Object> getData() {
+        List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
+        executorService = Executors.newFixedThreadPool(10);
+        CountDownLatch countDownLatch = new CountDownLatch(tokens.size());
+        tokens.forEach(record -> executorService.submit(() -> {
             try {
-//                reportService.getAdvertiserReport(record, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
-//                log.info("账户数据获取完成:account:{},时间:{}-{}",record.getAccountId(),record.getStartDate(),record.getEndDate());
-                bytedanceReportService.bytedanceMaterialReportV2(record);
-                log.info("素材数据获取完成:account:{},时间:{}-{}",record.getAccountId(),record.getStartDate(),record.getEndDate());
+                reportService.getAdvertiserReport(record, DateUtils.parseDate("2021-01-01", "yyyy-MM-dd"), DateUtils.parseDate("2021-01-31", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+                log.info("账户数据获取完成:account:{},时间:{}-{}", record.getAccountId(), "2021-01-01", "2020-01-31");
             } catch (Exception e) {
 
             } finally {
@@ -125,14 +298,13 @@ public class TestController {
         } catch (InterruptedException e) {
             e.printStackTrace();
         }
-        System.out.println("数据获取完成");
-        bytedanceReportMaterialDailyMapper.updateImageReportCode();
-        bytedanceReportMaterialDailyMapper.updateImageReportProjectId();
-        bytedanceReportMaterialDailyMapper.updateImageReportProjectName();
-        bytedanceReportMaterialDailyMapper.updateImageReportPlaneId();
-        bytedanceReportMaterialDailyMapper.updateImageReportPlaneName();
-        Map<String,Object> result =  new HashMap<>();
-        ResultMapUtils.setResultMap(new HashMap<>(),StatusCode.COMMON_SUCCESS);
+//        bytedanceReportMaterialDailyMapper.updateImageReportCode();
+//        bytedanceReportMaterialDailyMapper.updateImageReportProjectId();
+//        bytedanceReportMaterialDailyMapper.updateImageReportProjectName();
+//        bytedanceReportMaterialDailyMapper.updateImageReportPlaneId();
+//        bytedanceReportMaterialDailyMapper.updateImageReportPlaneName();
+        Map<String, Object> result = new HashMap<>();
+        ResultMapUtils.setResultMap(new HashMap<>(), StatusCode.COMMON_SUCCESS);
         return result;
     }
 
@@ -192,7 +364,7 @@ public class TestController {
                     QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
                     tokenQueryWrapper.eq("media_id", 2);
                     tokenQueryWrapper.eq("account_id", accountId);
-                    CtopOauthToken token = oauthTokenMapper.selectOne(tokenQueryWrapper);
+                    CtopOauthToken token = tokenMapper.selectOne(tokenQueryWrapper);
                     if (!Check.isNull(token)) {
                         suzhaoService.submit(new Runnable() {
                             @Override
@@ -282,26 +454,6 @@ public class TestController {
 
     }
 
-    @GetMapping(value = "/getGroupReport")
-    public void getGroupReport() throws ParseException {
-        List<CtopOauthToken> tokens = oauthTokenService.selectKuaiShouToken();
-        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-        Date parse1 = simpleDateFormat.parse("2020-09-12");
-        Date parse2 = simpleDateFormat.parse("2020-09-17");
-        for (CtopOauthToken token : tokens) {
-
-            suzhaoService.submit(new Runnable() {
-                @Override
-                public void run() {
-                    //1: 获取广告主信息数据
-                    kuaishouInterfaceService.getAdvertiserGroupReportDaily(token, parse1, parse2);
-                }
-            });
-
-
-        }
-    }
-
 
     @GetMapping(value = "/syncDouyinMusicAsc")
     public String syncDouyinMusicAsc() {
@@ -402,7 +554,7 @@ public class TestController {
                     QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
                     tokenQueryWrapper.eq("media_id", 2);
                     tokenQueryWrapper.eq("account_id", accountId);
-                    CtopOauthToken ctopOauthTokens = oauthTokenMapper.selectOne(tokenQueryWrapper);
+                    CtopOauthToken ctopOauthTokens = tokenMapper.selectOne(tokenQueryWrapper);
                     if (!Check.isNull(ctopOauthTokens)) {
                         historyReportTaskService.createTask(ctopOauthTokens.getAccountId(), ctopOauthTokens.getAccessToken(), startDate, endDate, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_DAILY);
 
@@ -435,7 +587,7 @@ public class TestController {
                     QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
                     tokenQueryWrapper.eq("media_id", 2);
                     tokenQueryWrapper.eq("account_id", accountId);
-                    CtopOauthToken ctopOauthTokens = oauthTokenMapper.selectOne(tokenQueryWrapper);
+                    CtopOauthToken ctopOauthTokens = tokenMapper.selectOne(tokenQueryWrapper);
                     if (!Check.isNull(ctopOauthTokens)) {
                         historyReportTaskService.createTask(ctopOauthTokens.getAccountId(), ctopOauthTokens.getAccessToken(), startDate, endDate, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
 
@@ -462,7 +614,7 @@ public class TestController {
             QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
             tokenQueryWrapper.eq("media_id", 2);
             tokenQueryWrapper.eq("account_id", accountId);
-            CtopOauthToken ctopOauthTokens = oauthTokenMapper.selectOne(tokenQueryWrapper);
+            CtopOauthToken ctopOauthTokens = tokenMapper.selectOne(tokenQueryWrapper);
             if (!Check.isNull(ctopOauthTokens)) {
                 historyReportTaskService.createTask(ctopOauthTokens.getAccountId(), ctopOauthTokens.getAccessToken(), statDate, statDate, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_DAILY);
 
@@ -532,162 +684,6 @@ public class TestController {
     }
 
 
-    @GetMapping(value = "/getSuZhao")
-    public void getSuZhao() throws JobExecutionException {
-        try {
-            //1:查询当日数据
-            QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
-            queryWrapper.eq("media_id", 2);
-            queryWrapper.orderByDesc("create_time");
-            List<CtopOauthToken> tokens = tokenService.list(queryWrapper);
-            if (null == tokens || tokens.size() <= 0) {
-                log.info("定时获取快手数据异常:未获取到可用的token");
-                return;
-            }
-
-            tokens.forEach(token -> {
-                suzhaoService.submit(new Runnable() {
-                    @Override
-                    public void run() {
-                        //1: 获取广告主信息数据
-                        log.info("获取素造素材:accountId:{}", token.getAccountId());
-                        kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, null, null);
-                    }
-                });
-            });
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-
-    }
-
-
-    @GetMapping(value = "/getAccountList")
-    public void getAccountList(String startDate, String endDate) throws JobExecutionException {
-        Thread thread = new Thread() {
-            @Override
-            public void run() {
-                SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
-                try {
-                    Date start = sim.parse(startDate);
-                    Date end = sim.parse(endDate);
-                    //1:查询当日数据
-                    List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-                    if (null == tokens || tokens.size() <= 0) {
-                        log.info("定时获取快手数据异常:未获取到可用的token");
-                        return;
-                    }
-
-                    executorService = Executors.newFixedThreadPool(3);
-                    tokens.forEach(token -> {
-                        executorService.submit(new Runnable() {
-                            @Override
-                            public void run() {
-                                //1: 获取广告主信息数据
-                                kuaishouInterfaceService.getAdvertiserReportDaily(token, start, end);
-                            }
-                        });
-                    });
-                } catch (ParseException e) {
-                    e.printStackTrace();
-                }
-
-
-            }
-        };
-        thread.start();
-
-    }
-
-
-    @GetMapping(value = "/getVideo")
-    public String getVideo(String startDate, String endDate) throws IOException {
-        try {
-            Thread thread = new Thread() {
-                @Override
-                public void run() {
-                    QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
-                    tokenQueryWrapper.eq("media_id", 2);
-                    List<CtopOauthToken> list = tokenService.list(tokenQueryWrapper);
-                    list.forEach(token -> {
-                        videoService.submit(new Runnable() {
-                            @Override
-                            public void run() {
-                                try {
-                                    kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, null, null);
-                                    kuaishouInterfaceService.getVideoList(token, null, null);
-                                    Thread.sleep(5000);
-                                     /*String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
-                                    String videoEndDate = DateUtils.addDay(nowDate, -180);
-                                   SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-                                    Date end = simpleDateFormat.parse(nowDate);
-                                    Date start = simpleDateFormat.parse(videoEndDate);
-                                    List<Date> dates = DateUtils.findDates(start, end);
-                                    for (int i = 0; i < dates.size(); i++) {
-                                        String formatDate = simpleDateFormat.format(dates.get(i));
-                                        kuaishouInterfaceService.getImageList(token, formatDate);
-                                        Thread.sleep(500);
-                                    }*/
-
-                                } catch (Exception e) {
-                                    e.printStackTrace();
-                                } finally {
-                                }
-                            }
-                        });
-                    });
-                    log.info("快手物料数据同步完成");
-                }
-            };
-            thread.start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return "Success";
-    }
-
-
-    @GetMapping(value = "/getVideoByAccountId")
-    public String getVideoByAccountId(Long accountId) throws IOException {
-        try {
-            Thread thread = new Thread() {
-                @Override
-                public void run() {
-                    QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
-                    tokenQueryWrapper.eq("media_id", 2);
-                    tokenQueryWrapper.eq("account_id", accountId);
-                    CtopOauthToken one = tokenService.getOne(tokenQueryWrapper);
-                    try {
-                        kuaishouInterfaceService.getSuZaoList(one.getAccessToken(), one.getAccountId(), 1, null, null);
-                        kuaishouInterfaceService.getVideoList(one, null, null);
-                        String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
-                        String videoEndDate = DateUtils.addDay(nowDate, -180);
-                        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-                        Date end = simpleDateFormat.parse(nowDate);
-                        Date start = simpleDateFormat.parse(videoEndDate);
-                        List<Date> dates = DateUtils.findDates(start, end);
-                        for (int i = 0; i < dates.size(); i++) {
-                            String formatDate = simpleDateFormat.format(dates.get(i));
-
-                            kuaishouInterfaceService.getImageList(one, formatDate);
-                            Thread.sleep(100);
-                        }
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    } finally {
-                    }
-                    log.info("快手物料数据同步完成");
-                }
-            };
-            thread.start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return "Success";
-    }
-
-
     @GetMapping(value = "/createCutTask")
     public String createCutTask(String startDate, String endDate) throws IOException {
         List<MaterialInfo> materialInfos = materialInfoService.getListByDate(startDate, endDate);
@@ -710,51 +706,21 @@ public class TestController {
     }
 
 
-    @GetMapping(value = "/getToken")
-    public String getToken(Long accountId, String token, String refreshToken, Integer agentType) {
-        oauthTokenService.getKuaiShouRefreshToken(accountId, token, refreshToken, agentType);
-        return "Success";
-    }
-
-
     @GetMapping(value = "/getAccountReport")
     public String getAccountReport(Long accountId, String startDate, String endDate) throws ParseException {
         QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
         oauthTokenQueryWrapper.eq("media_id", 2);
         oauthTokenQueryWrapper.eq("account_id", accountId);
         oauthTokenQueryWrapper.last("limit 1");
-        CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
+        CtopOauthToken token = tokenMapper.selectOne(oauthTokenQueryWrapper);
         SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
         Date date1 = sim.parse(startDate);
         Date date2 = sim.parse(endDate);
-        kuaishouInterfaceService.getAdvertiserReportDaily(token, date1, date2);
+        //    kuaishouInterfaceService.getAdvertiserReportDaily(token, date1, date2);
         return "Success";
     }
 
 
-    @GetMapping(value = "/getAccountReportList")
-    public String getAccountReportList(String startDate, String endDate) {
-        Result<String> result = new Result<>();
-        try {
-            SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
-            Date date1 = sim.parse(startDate);
-            Date date2 = sim.parse(endDate);
-            QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
-            tokenQueryWrapper.eq("media_id", 2);
-            List<CtopOauthToken> ctopOauthTokens = oauthTokenMapper.selectList(tokenQueryWrapper);
-            if (!Check.isNull(ctopOauthTokens)) {
-                for (CtopOauthToken token : ctopOauthTokens) {
-                    kuaishouInterfaceService.getAdvertiserReportDaily(token, date1, date2);
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            result.setSuccess(false);
-        }
-        return "success";
-    }
-
-
     @GetMapping(value = "/updateCode")
     public String updateCode() {
         List<MaterialInfo> list = materialInfoService.list();
@@ -819,7 +785,7 @@ public class TestController {
             oauthTokenQueryWrapper.eq("media_id", 2);
             oauthTokenQueryWrapper.eq("account_id", accountId);
             oauthTokenQueryWrapper.last("limit 1");
-            CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
+            CtopOauthToken token = tokenMapper.selectOne(oauthTokenQueryWrapper);
             String endDateStr = DateUtils.getDate("yyyy-MM-dd");
             String startDate = DateUtils.addMonth(endDateStr, -6);
             historyReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), startDate, endDateStr, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
@@ -840,7 +806,7 @@ public class TestController {
             String startDate = DateUtils.addMonth(endDateStr, -6);
             QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
             tokenQueryWrapper.eq("media_id", 2);
-            List<CtopOauthToken> ctopOauthTokens = oauthTokenMapper.selectList(tokenQueryWrapper);
+            List<CtopOauthToken> ctopOauthTokens = tokenMapper.selectList(tokenQueryWrapper);
             if (!Check.isNull(ctopOauthTokens)) {
                 for (CtopOauthToken token : ctopOauthTokens) {
                     historyReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), "2020-09-01", "2020-10-01", CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
@@ -864,7 +830,7 @@ public class TestController {
             QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
             tokenQueryWrapper.eq("media_id", 2);
             tokenQueryWrapper.eq("account_id", accountId);
-            CtopOauthToken ctopOauthTokens = oauthTokenMapper.selectOne(tokenQueryWrapper);
+            CtopOauthToken ctopOauthTokens = tokenMapper.selectOne(tokenQueryWrapper);
             if (!Check.isNull(ctopOauthTokens)) {
                 historyReportTaskService.createTask(ctopOauthTokens.getAccountId(), ctopOauthTokens.getAccessToken(), startDate, endDateStr, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
 
@@ -891,44 +857,12 @@ public class TestController {
         return "success";
     }
 
-    @GetMapping(value = "/getGroupData")
-    public String getGroupData() {
-
-
-        Date endDate = new Date();
-        QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
-        tokenQueryWrapper.eq("media_id", 2);
-        List<CtopOauthToken> ctopOauthTokens = tokenMapper.selectList(tokenQueryWrapper);
-        for (CtopOauthToken token : ctopOauthTokens) {
-
-            for (int i = 0; i < 7; i++) {
-                Date getStartDate = DateUtils.addDay(endDate, -i);
-                //3:获取广告组信息数据
-                kuaishouInterfaceService.getAdvertiserGroupReportHourly(token, getStartDate, getStartDate);
-            }
-            for (int i = 0; i < 6; i++) {
-                Date getStartDate = new Date();
-                Date getEndDate = new Date();
-                if (i == 0) {
-                    getStartDate = DateUtils.addDay(endDate, -175 + i * 30);
-                    getEndDate = DateUtils.addDay(endDate, -150 + i * 30);
-                } else {
-                    getStartDate = DateUtils.addDay(endDate, -180 + i * 30);
-                    getEndDate = DateUtils.addDay(endDate, -150 + i * 30);
-                }
-                //3:获取广告组信息数据
-                kuaishouInterfaceService.getAdvertiserGroupReportDaily(token, getStartDate, getEndDate);
-            }
-        }
-        return "Success";
-    }
-
 
     @GetMapping(value = "/gerCreative")
     public void gerCreative() {
         QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
         oauthTokenQueryWrapper.eq("media_id", 2);
-        List<CtopOauthToken> ctopOauthTokens = oauthTokenMapper.selectList(oauthTokenQueryWrapper);
+        List<CtopOauthToken> ctopOauthTokens = tokenMapper.selectList(oauthTokenQueryWrapper);
         for (CtopOauthToken token : ctopOauthTokens) {
             executorService.submit(new Runnable() {
                 @Override
@@ -1001,7 +935,7 @@ public class TestController {
         oauthTokenQueryWrapper.eq("media_id", 2);
         oauthTokenQueryWrapper.eq("account_id", accountId);
         oauthTokenQueryWrapper.last("limit 1");
-        CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
+        CtopOauthToken token = tokenMapper.selectOne(oauthTokenQueryWrapper);
         try {
             // kuaishouInterfaceService.getCampaignList(token, null, null);
             //1:获取全量广告组数据
@@ -1013,13 +947,6 @@ public class TestController {
         }
     }
 
-
-    @Autowired
-    private IBytedancePlanDailyReportService planDailyReportService;
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-
-
     @Autowired
     private IByteDanceAdvertiserDataService advertiserDataService;
 
@@ -1048,38 +975,6 @@ public class TestController {
     private IBytedancePlanHourlyReportService planHourlyReportService;
 
 
-    @GetMapping(value = "/AccountReportByAccount")
-    public void AccountReportByAccount(Long accountId, String startDateStr, String endDateStr) {
-        QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
-        oauthTokenQueryWrapper.eq("media_id", 2);
-        oauthTokenQueryWrapper.eq("account_id", accountId);
-        oauthTokenQueryWrapper.last("limit 1");
-        CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
-        executorService.submit(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-                    Date startDate = null;
-                    Date endDate = null;
-                    try {
-                        startDate = simpleDateFormat.parse(startDateStr);
-                        endDate = simpleDateFormat.parse(endDateStr);
-                    } catch (ParseException e) {
-                        e.printStackTrace();
-                    }
-                    kuaishouInterfaceService.getAdvertiserReportDaily(token, startDate, endDate);
-
-                    Thread.sleep(1 * 200);
-                    //  kuaishouInterfaceService.getAppList(token.getAccountId(), token.getAccessToken());
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-    }
-
-
     @GetMapping(value = "/getAllCreativeList")
     public void getAllCreativeList() {
 
@@ -1088,7 +983,7 @@ public class TestController {
 
             QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
             oauthTokenQueryWrapper.eq("media_id", 2);
-            List<CtopOauthToken> ctopOauthTokens = oauthTokenMapper.selectList(oauthTokenQueryWrapper);
+            List<CtopOauthToken> ctopOauthTokens = tokenMapper.selectList(oauthTokenQueryWrapper);
 
             if (!Check.isNull(ctopOauthTokens)) {
                 for (CtopOauthToken token : ctopOauthTokens) {
@@ -1118,7 +1013,7 @@ public class TestController {
 
             QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
             oauthTokenQueryWrapper.eq("media_id", 2);
-            List<CtopOauthToken> ctopOauthTokens = oauthTokenMapper.selectList(oauthTokenQueryWrapper);
+            List<CtopOauthToken> ctopOauthTokens = tokenMapper.selectList(oauthTokenQueryWrapper);
             if (!Check.isNull(ctopOauthTokens)) {
                 for (CtopOauthToken token : ctopOauthTokens) {
                     executorService.submit(new Runnable() {
@@ -1138,27 +1033,6 @@ public class TestController {
 
     }
 
-    @GetMapping(value = "/KuaishouDailyAccountReportLoadJob")
-    public void KuaishouDailyAccountReportLoadJob() {
-        Date getDate = DateUtils.addDay(new Date(), -2);
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-        if (null == tokens || tokens.size() <= 0) {
-            log.info("定时获取快手数据异常:未获取到可用的token");
-            return;
-        }
-
-        executorService = Executors.newFixedThreadPool(3);
-        tokens.forEach(token -> {
-            executorService.submit(new Runnable() {
-                @Override
-                public void run() {
-                    //1: 获取广告主信息数据
-                    kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate, getDate);
-                }
-            });
-        });
-    }
 
     @Autowired
     private IBytedanceEffectVideoInfoService effectVideoInfoService;
@@ -1327,4 +1201,80 @@ public class TestController {
         ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
         return result;
     }
+
+    @GetMapping("loadMatData")
+    public Map<String, Object> getData(String startDate, String endDate, Long accountId) {
+        Map<String, Object> result = new HashMap<>();
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        Date start = DateUtils.parseDate(startDate, "yyyy-MM-dd");
+        int days = DateUtils.getdaysOfTwoDate(startDate, endDate) + 1;
+        for (int i = 0; i < days; i++) {
+            String getDate = DateUtils.formatDate(DateUtils.addDay(start, i));
+            bytedanceReportService.bytedanceMaterialReport(token, getDate, getDate);
+        }
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
+    @GetMapping("loadAccountData")
+    public Map<String, Object> getData(Long accountId) {
+        Map<String, Object> result = new HashMap<>();
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        reportService.getAdvertiserReport(token, DateUtils.parseDate("2021-01-01", "yyyy-MM-dd"), DateUtils.parseDate("2021-01-31", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
+    @Autowired
+    IBytedanceVideoReportService bytedanceVideoReportService;
+    @Autowired
+    IETLReportBytedanceVideoService etlReportBytedanceVideoService;
+
+
+    @Autowired
+    private IKuaishouAudienceReportDailyService kuaishouAudienceReportDailyService;
+    @Autowired
+    private IKuaiShouGroupService kuaiShouGroupService;
+    @Autowired
+    private IKuaishouStrategyService kuaishouStrategyService;
+
+    /**
+     * 勿动勿删,煜一人群报表数据拉取接口。
+     *
+     * @param
+     * @return void
+     * @throws
+     * @author ZHAOXA
+     */
+    @PostMapping(value = "/getAudienceData")
+    public Result getAudienceData(@RequestBody JSONObject request) throws Exception {
+        Long accountId = request.getLong("accountId");
+        Long planId = request.getLong("planId");
+        Long unitId = request.getLong("unitId");
+        String type = request.getString("type");
+        String startTime = request.getString("startTime");
+        String endTime = request.getString("endTime");
+        if (Check.isNull(accountId) || Check.isNull(planId) || Check.isNull(unitId) || Check.isNull(type) || Check.isNull(endTime) || Check.isNull(startTime)) {
+            return Result.error("缺少参数");
+        }
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        List<String> dayList = new ArrayList<>();
+        if (startTime.equals(endTime)) {
+            dayList.add(startTime);
+        } else {
+            dayList = DateUtils.getDays(startTime, endTime);
+        }
+        ExecutorService executorServic1e = Executors.newFixedThreadPool(8);
+        int page = 1;
+        int pageSize = 2000;
+        dayList.forEach(date -> executorServic1e.submit(() -> {
+            try {
+                kuaishouAudienceReportDailyService.crowdAnalysisReport(token, date, type, planId, unitId, page, pageSize);
+                Thread.sleep(500);
+            } catch (InterruptedException e) {
+                log.error("获取人群消息异常", e);
+            }
+        }));
+        return Result.ok("success");
+    }
 }

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TransferAccountController.java

@@ -9,12 +9,12 @@ import cn.com.ctop.common.module.service.IProjectService;
 import cn.com.ctop.common.module.service.ISysRoleExtService;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.ctop.entity.ProjectMember;
 import org.jeecg.modules.ctop.entity.TransferAccount;
 import org.jeecg.modules.ctop.service.IProjectMemberService;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UReportFileBindUserController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.ResultMapUtils;
 import cn.com.ctop.common.module.utils.StatusCode;
 import cn.com.ctop.toutiao.modules.report.service.IBytedancePlanDailyReportService;
@@ -13,7 +14,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.ctop.entity.UReportFile;
 import org.jeecg.modules.ctop.entity.UReportFileBindUser;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UReportFileController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -9,7 +10,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.ctop.entity.UReportFile;
 import org.jeecg.modules.ctop.service.IUReportFileService;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UserAllocationController.java

@@ -13,6 +13,7 @@ import cn.com.ctop.common.module.service.IProjectService;
 import cn.com.ctop.common.module.service.ISysRoleExtService;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
@@ -26,7 +27,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.ctop.entity.ProjectMember;
 import org.jeecg.modules.ctop.mapper.ProjectMemberMapper;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/VideoMergeTaskController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.VideoMergeTask;
 import cn.com.ctop.common.module.service.IVideoMergeTaskService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/VideoPartController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.VideoPart;
 import cn.com.ctop.common.module.service.IVideoPartService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/VideoWatermarkTaskController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.VideoWatermarkTask;
 import cn.com.ctop.common.module.service.IVideoWatermarkTaskService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/VideoWatermarkTemplateController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.TencentWatermarkTemplate;
 import cn.com.ctop.common.module.service.ITencentWatermarkTemplateService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;

+ 2 - 2
module-common/src/main/java/cn/com/ctop/common/module/controller/WarningOperationLogController.java

@@ -1,8 +1,9 @@
-package cn.com.ctop.common.module.controller;
+package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.WarningOperationLog;
 import cn.com.ctop.common.module.service.IWarningOperationLogService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 5 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/YardController.java

@@ -2,7 +2,11 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
-import cn.com.ctop.manage.modules.actor.entity.*;
+import cn.com.ctop.common.module.utils.QueryGenerator;
+import cn.com.ctop.manage.modules.actor.entity.Yard;
+import cn.com.ctop.manage.modules.actor.entity.YardComment;
+import cn.com.ctop.manage.modules.actor.entity.YardPhoto;
+import cn.com.ctop.manage.modules.actor.entity.YardVideo;
 import cn.com.ctop.manage.modules.actor.service.IYardCommentService;
 import cn.com.ctop.manage.modules.actor.service.IYardPhotoService;
 import cn.com.ctop.manage.modules.actor.service.IYardService;
@@ -12,7 +16,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 0 - 62
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouDailyAccountReportLoadJob.java

@@ -1,62 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 快手广告主分天数据
- *
- * @author syh
- */
-@Slf4j
-public class KuaishouDailyAccountReportLoadJob implements Job {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-    static ExecutorService executorService = null;
-
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        Thread thread = new Thread() {
-            @Override
-            public void run() {
-                Date getDate2 = DateUtils.addDay(new Date(), -2);
-                Date getDate = DateUtils.addDay(new Date(), -1);
-                //1:查询当日数据
-                List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-                if (null == tokens || tokens.size() <= 0) {
-                    log.info("定时获取快手数据异常:未获取到可用的token");
-                    return;
-                }
-
-                executorService = Executors.newFixedThreadPool(3);
-                tokens.forEach(token -> {
-                    executorService.submit(new Runnable() {
-                        @Override
-                        public void run() {
-                            //跑两天前的账户报表---次留统计用
-                            kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate2, getDate2);
-                            //1: 获取广告主信息数据
-                            kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate, getDate);
-                        }
-                    });
-                });
-            }
-        };
-        thread.start();
-
-    }
-}

+ 0 - 60
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouDailyAccountReportNextDayStayJob.java

@@ -1,60 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 快手广告主次留数据--凌晨跑两天前的次留,统一跑起来
- *
- * @author sunzhen
- */
-@Slf4j
-public class KuaishouDailyAccountReportNextDayStayJob implements Job {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-    static ExecutorService executorService = null;
-
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        log.info("快手次留率定时任务开始");
-        Thread thread = new Thread() {
-            @Override
-            public void run() {
-                Date getDate = DateUtils.addDay(new Date(), -1);
-                //1:查询当日数据
-                List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-                if (null == tokens || tokens.size() <= 0) {
-                    log.info("定时获取快手数据异常:未获取到可用的token");
-                    return;
-                }
-
-                executorService = Executors.newFixedThreadPool(3);
-                tokens.forEach(token -> {
-                    executorService.submit(new Runnable() {
-                        @Override
-                        public void run() {
-                            //1: 获取广告主信息数据
-                            kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate, getDate);
-                        }
-                    });
-                });
-            }
-        };
-        thread.start();
-
-    }
-}

+ 4 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouDailyGroupReportLoadJob.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.job;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
+import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyGroupService;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.quartz.Job;
@@ -26,6 +27,8 @@ public class KuaishouDailyGroupReportLoadJob implements Job {
     private ICtopOauthTokenService tokenService;
     @Autowired
     private IKuaishouInterfaceService kuaishouInterfaceService;
+    @Autowired
+    private IKuaishouReportDailyGroupService reportDailyGroupService;
     static ExecutorService executorService = null;
 
     @Override
@@ -48,7 +51,7 @@ public class KuaishouDailyGroupReportLoadJob implements Job {
                         @Override
                         public void run() {
                             //获取广告组信息数据
-                            kuaishouInterfaceService.getAdvertiserGroupReportDaily(token, getDate, getDate);
+                            reportDailyGroupService.getAdvertiserGroupReportDaily(token, getDate, getDate);
                         }
                     });
                 });

+ 1 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouHourlyAccountReportLoadJob.java

@@ -29,7 +29,7 @@ public class KuaishouHourlyAccountReportLoadJob implements Job {
     @Autowired
     private IKuaishouInterfaceService kuaishouInterfaceService;
 
-    static ExecutorService executorService = null;
+    static ExecutorService executorService = Executors.newFixedThreadPool(8);
     //线程计数器
     static CountDownLatch countDownLatch = null;
 
@@ -50,7 +50,6 @@ public class KuaishouHourlyAccountReportLoadJob implements Job {
                     log.info("定时获取快手数据异常:未获取到可用的token");
                     return;
                 }
-                executorService = Executors.newFixedThreadPool(5);
                 countDownLatch = new CountDownLatch(tokens.size());
                 Date finalGetDate = getDate;
                 tokens.forEach(token -> {

+ 0 - 55
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouSuZaoLoadJob.java

@@ -1,55 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-@Slf4j
-public class KuaishouSuZaoLoadJob implements Job {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-
-    static ExecutorService executorService = null;
-
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        Thread thread = new Thread() {
-            @Override
-            public void run() {
-                List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-                executorService = Executors.newFixedThreadPool(8);
-                tokens.forEach(token -> {
-                    executorService.submit(new Runnable() {
-                        @Override
-                        public void run() {
-                            try {
-                                String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
-                                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, 1);
-                                String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
-                                kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startDate, endDate);
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                            } finally {
-                            }
-                        }
-                    });
-                });
-                log.info("快手素造数据同步完成");
-            }
-        };
-        thread.start();
-
-    }
-}

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/MergeVideoJob.java

@@ -36,7 +36,6 @@ public class MergeVideoJob implements Job {
 
                     try {
                         String localPath = LoadFileUtil.downLoadFromUrl(url, PropertiesUtils.getValue("kuaishou_config", "video_sava_path"));
-//                        String localPath = LoadFileUtil.downLoadFromUrl(url,"D:/video/");
                         String md5 = LoadFileUtil.getMD5(localPath);
                         LoadFileUtil.delFile(localPath);
                         MaterialInfo materialInfo = new MaterialInfo();

+ 0 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/AdvertiserMapper.java


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików