Ver código fonte

Merge branch 'master' into test

# Conflicts:
#	jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/clean/service/impl/KuaiShouAccountCleanServiceImpl.java
#	jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/label/service/impl/MaterialLabelServiceImpl.java
yumeng 3 anos atrás
pai
commit
28431c2c0d
78 arquivos alterados com 520 adições e 842 exclusões
  1. 6 0
      jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseApi.java
  2. 1 1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java
  3. 1 1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/PasswordUtil.java
  4. 4 4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oConvertUtils.java
  5. 16 16
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/WebMvcConfiguration.java
  6. 3 3
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisInterceptor.java
  7. 0 1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  8. 5 0
      jeecg-boot-base/jeecg-boot-base-tools/src/main/java/org/jeecg/common/modules/redis/writer/JeecgRedisCacheWriter.java
  9. 4 4
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/controller/AiBytedanceAdvertiserStrategyController.java
  10. 1 1
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/controller/BytedanceGeneralCopywriterController.java
  11. 1 1
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/controller/BytedanceReportController.java
  12. 1 1
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/controller/BytedanceVideoSlogenInfoController.java
  13. 11 11
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java
  14. 1 0
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/service/impl/ByteDanceAdvertisePlanServiceImpl.java
  15. 2 1
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/service/impl/BytedanceRejectReasonServiceImpl.java
  16. 1 1
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/common/utils/Check.java
  17. 1 1
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/common/utils/ExcelUtil.java
  18. 1 1
      jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/report/service/impl/BytedanceAdvertiserHourlyReportServiceImpl.java
  19. 2 2
      jeecg-boot-module-system/pom.xml
  20. 4 4
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/controller/RuleSwitchController.java
  21. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/MaterialImageInfoServiceImpl.java
  22. 2 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java
  23. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/UserAllocationServiceImpl.java
  24. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/utils/StatusCode.java
  25. 0 131
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/utils/TokenUtils.java
  26. 2 2
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaiShouAppInfoServiceImpl.java
  27. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouCreateCreativeServiceImpl.java
  28. 15 15
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouProjectCreateCreativeServiceImpl.java
  29. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouStrategyTargetBaseServiceImpl.java
  30. 11 11
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiStrategyServiceImpl.java
  31. 2 2
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/KuaishouAppPackageServiceImpl.java
  32. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouVideoGetServiceImpl.java
  33. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java
  34. 70 103
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/clean/service/impl/KuaiShouAccountCleanServiceImpl.java
  35. 2 2
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/dimension/controller/KuaiShouDimensionStrategyController.java
  36. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/dimension/service/impl/KuaiShouDimensionStrategyServiceImpl.java
  37. 21 380
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/label/service/impl/MaterialLabelServiceImpl.java
  38. 7 7
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/EtlKuaishouVideoInfoServiceImpl.java
  39. 2 2
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsNewGroupReportCtrl.java
  40. 2 2
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsNewPlanReportCtrl.java
  41. 3 3
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/EtlKuaiShouNewlyServiceImpl.java
  42. 3 3
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/EtlKuaishouReportAccountHourlyServiceImpl.java
  43. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouProjectVideoEtlInfoServiceImpl.java
  44. 15 15
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouVideoEtlInfoServiceImpl.java
  45. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/oa/modules/service/impl/AppchatCreateServiceImpl.java
  46. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/shiwan/modules/controller/ShiwanFileUploadController.java
  47. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceNewPlanReportCtrl.java
  48. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceVideoReportMapper.xml
  49. 30 30
      jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceVideoEtlInfoServiceImpl.java
  50. 10 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceVideoReportServiceImpl.java
  51. 4 4
      jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java
  52. 1 1
      jeecg-boot-module-system/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
  53. 4 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ads/controller/AiKuaiShouReportAnalyzeCtrl.java
  54. 8 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/XmlUtils.java
  55. 6 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceVideoEtlInfoController.java
  56. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java
  57. 6 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouVideoEtlInfoController.java
  58. 1 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialInfoController.java
  59. 46 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectMemberController.java
  60. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  61. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UserAllocationController.java
  62. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/MaterialReportOverViewServiceImpl.java
  63. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/orderplatform/service/impl/PlatformMaterialServiceImpl.java
  64. 81 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java
  65. 6 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/CategoryCodeRule.java
  66. 3 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrderNumberRule.java
  67. 3 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrgCodeRule.java
  68. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wps/controller/WpsFileController.java
  69. 17 2
      jeecg-cloud-module/jeecg-cloud-gateway/src/main/resources/application-test.yml
  70. 10 0
      jeecg-cloud-module/jeecg-cloud-system-start/pom.xml
  71. 7 0
      jeecg-cloud-module/jeecg-cloud-system-start/src/main/resources/application-dev.yml
  72. 8 1
      jeecg-cloud-module/jeecg-cloud-system-start/src/main/resources/application-prod.yml
  73. 13 2
      jeecg-cloud-module/jeecg-cloud-system-start/src/main/resources/application-test.yml
  74. 0 12
      jeecg-cloud-module/jeecg-cloud-system-start/src/main/resources/application.yml
  75. 1 0
      jeecg-cloud-module/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/core/alarm/impl/EmailJobAlarm.java
  76. 11 7
      jeecg-cloud-module/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/core/cron/CronExpression.java
  77. 0 0
      lib/jave-1.0.jar
  78. 0 0
      lib/opencv-4.2.0.jar

+ 6 - 0
jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseApi.java

@@ -295,10 +295,13 @@ public interface ISysBaseApi extends CommonAPI {
      * @param username
      * @return
      */
+    @Override
     LoginUser getUserByName(String username);
 
+    @Override
     List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username);
 
+    @Override
     SysUserCacheInfo getCacheUser(String username);
 
     /**
@@ -313,6 +316,7 @@ public interface ISysBaseApi extends CommonAPI {
      * @param code
      * @return
      */
+    @Override
     public List<DictModel> queryDictItemsByCode(String code);
 
 
@@ -323,6 +327,7 @@ public interface ISysBaseApi extends CommonAPI {
      * @param code
      * @return
      */
+    @Override
     List<DictModel> queryTableDictItemsByCode(String table, String text, String code);
 
     /**
@@ -426,6 +431,7 @@ public interface ISysBaseApi extends CommonAPI {
      * @param dbSourceId
      * @return
      */
+    @Override
     DynamicDataSourceModel getDynamicDbSourceById(String dbSourceId);
 
     /**

+ 1 - 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java

@@ -29,7 +29,7 @@ import org.jeecg.common.util.oConvertUtils;
 public class JwtUtil {
 
 	// Token过期时间30分钟(用户登录过期时间是此时间的两倍,以token在reids缓存时间为准)
-	public static final long EXPIRE_TIME = 30 * 60 * 1000;
+	public static final long EXPIRE_TIME = 8 * 60 * 60 * 1000;
 
 	/**
 	 * 校验token是否正确

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

@@ -158,7 +158,7 @@ public class PasswordUtil {
 	 * @return
 	 */
 	public static byte[] hexStringToBytes(String hexString) {
-		if (hexString == null || hexString.equals("")) {
+		if (hexString == null || "".equals(hexString)) {
 			return null;
 		}
 		hexString = hexString.toUpperCase();

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

@@ -41,7 +41,7 @@ public class oConvertUtils {
 	}
 	
 	public static boolean isNotEmpty(Object object) {
-		if (object != null && !object.equals("") && !object.equals("null")) {
+		if (object != null && !"".equals(object) && !"null".equals(object)) {
 			return (true);
 		}
 		return (false);
@@ -66,7 +66,7 @@ public class oConvertUtils {
 
 	private static String code2code(String strIn, String sourceCode, String targetCode) {
 		String strOut = null;
-		if (strIn == null || (strIn.trim()).equals("")) {
+		if (strIn == null || "".equals(strIn.trim())) {
 			return strIn;
 		}
 		try {
@@ -396,7 +396,7 @@ public class oConvertUtils {
 		long bEnd = getIpNum("172.31.255.255");
 		long cBegin = getIpNum("192.168.0.0");
 		long cEnd = getIpNum("192.168.255.255");
-		isInnerIp = isInner(ipNum, aBegin, aEnd) || isInner(ipNum, bBegin, bEnd) || isInner(ipNum, cBegin, cEnd) || ipAddress.equals("127.0.0.1");
+		isInnerIp = isInner(ipNum, aBegin, aEnd) || isInner(ipNum, bBegin, bEnd) || isInner(ipNum, cBegin, cEnd) || "127.0.0.1".equals(ipAddress);
 		return isInnerIp;
 	}
 
@@ -467,7 +467,7 @@ public class oConvertUtils {
 	 * @return 转换后的驼峰式命名的字符串
 	 */
 	public static String camelNames(String names) {
-		if(names==null||names.equals("")){
+		if(names==null|| "".equals(names)){
 			return null;
 		}
 		StringBuffer sf = new StringBuffer();

+ 16 - 16
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/WebMvcConfiguration.java

@@ -54,22 +54,22 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
         registry.addViewController("/").setViewName("doc.html");
     }
 
-//    @Bean
-//    @Conditional(CorsFilterCondition.class)
-//    public CorsFilter corsFilter() {
-//        final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource();
-//        final CorsConfiguration corsConfiguration = new CorsConfiguration();
-//        //是否允许请求带有验证信息
-//        corsConfiguration.setAllowCredentials(true);
-//        // 允许访问的客户端域名
-//        corsConfiguration.addAllowedOrigin("*");
-//        // 允许服务端访问的客户端请求头
-//        corsConfiguration.addAllowedHeader("*");
-//        // 允许访问的方法名,GET POST等
-//        corsConfiguration.addAllowedMethod("*");
-//        urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration);
-//        return new CorsFilter(urlBasedCorsConfigurationSource);
-//    }
+    @Bean
+    @Conditional(CorsFilterCondition.class)
+    public CorsFilter corsFilter() {
+        final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource();
+        final CorsConfiguration corsConfiguration = new CorsConfiguration();
+        //是否允许请求带有验证信息
+        corsConfiguration.setAllowCredentials(true);
+        // 允许访问的客户端域名
+        corsConfiguration.addAllowedOrigin("*");
+        // 允许服务端访问的客户端请求头
+        corsConfiguration.addAllowedHeader("*");
+        // 允许访问的方法名,GET POST等
+        corsConfiguration.addAllowedMethod("*");
+        urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration);
+        return new CorsFilter(urlBasedCorsConfigurationSource);
+    }
 
     /**
     * 添加Long转json精度丢失的配置

+ 3 - 3
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisInterceptor.java

@@ -48,7 +48,7 @@ public class MybatisInterceptor implements Interceptor {
 						field.setAccessible(true);
 						Object local_createBy = field.get(parameter);
 						field.setAccessible(false);
-						if (local_createBy == null || local_createBy.equals("")) {
+						if (local_createBy == null || "".equals(local_createBy)) {
 							if (sysUser != null) {
 								// 登录人账号
 								field.setAccessible(true);
@@ -62,7 +62,7 @@ public class MybatisInterceptor implements Interceptor {
 						field.setAccessible(true);
 						Object local_createDate = field.get(parameter);
 						field.setAccessible(false);
-						if (local_createDate == null || local_createDate.equals("")) {
+						if (local_createDate == null || "".equals(local_createDate)) {
 							field.setAccessible(true);
 							field.set(parameter, new Date());
 							field.setAccessible(false);
@@ -73,7 +73,7 @@ public class MybatisInterceptor implements Interceptor {
 						field.setAccessible(true);
 						Object local_sysOrgCode = field.get(parameter);
 						field.setAccessible(false);
-						if (local_sysOrgCode == null || local_sysOrgCode.equals("")) {
+						if (local_sysOrgCode == null || "".equals(local_sysOrgCode)) {
 							// 获取登录用户信息
 							if (sysUser != null) {
 								field.setAccessible(true);

+ 0 - 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

@@ -207,7 +207,6 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/ai/batchUpdate/*", "anon");
         filterChainDefinitionMap.put("/ctop/kuaishou/videoReport/*", "anon");
         filterChainDefinitionMap.put("/ai/create/*", "anon");
-        filterChainDefinitionMap.put("/overView/*", "anon");
         filterChainDefinitionMap.put("/kuaishouCrowdPack/**", "anon");
         filterChainDefinitionMap.put("/kuaishou/batch/*", "anon");
         filterChainDefinitionMap.put("/dimension/kuaiShouDimensionAccount/*", "anon");

+ 5 - 0
jeecg-boot-base/jeecg-boot-base-tools/src/main/java/org/jeecg/common/modules/redis/writer/JeecgRedisCacheWriter.java

@@ -39,6 +39,7 @@ public class JeecgRedisCacheWriter implements RedisCacheWriter {
         this.sleepTime = sleepTime;
     }
 
+    @Override
     public void put(String name, byte[] key, byte[] value, @Nullable Duration ttl) {
         Assert.notNull(name, "Name must not be null!");
         Assert.notNull(key, "Key must not be null!");
@@ -54,6 +55,7 @@ public class JeecgRedisCacheWriter implements RedisCacheWriter {
         });
     }
 
+    @Override
     public byte[] get(String name, byte[] key) {
         Assert.notNull(name, "Name must not be null!");
         Assert.notNull(key, "Key must not be null!");
@@ -62,6 +64,7 @@ public class JeecgRedisCacheWriter implements RedisCacheWriter {
         });
     }
 
+    @Override
     public byte[] putIfAbsent(String name, byte[] key, byte[] value, @Nullable Duration ttl) {
         Assert.notNull(name, "Name must not be null!");
         Assert.notNull(key, "Key must not be null!");
@@ -97,6 +100,7 @@ public class JeecgRedisCacheWriter implements RedisCacheWriter {
         });
     }
 
+    @Override
     public void remove(String name, byte[] key) {
         Assert.notNull(name, "Name must not be null!");
         Assert.notNull(key, "Key must not be null!");
@@ -119,6 +123,7 @@ public class JeecgRedisCacheWriter implements RedisCacheWriter {
         }
     }
 
+    @Override
     public void clean(String name, byte[] pattern) {
         Assert.notNull(name, "Name must not be null!");
         Assert.notNull(pattern, "Pattern must not be null!");

+ 4 - 4
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/controller/AiBytedanceAdvertiserStrategyController.java

@@ -200,7 +200,7 @@ public class AiBytedanceAdvertiserStrategyController {
 			//账户预算 同步 头条
 			//BUDGET_MODE_DAY-日预算
 			// BUDGET_MODE_INFINITE-不限
-			String accountBudgetMode = aiBytedanceAdvertiserStrategy.getAccountBudgetMode().equals("1") ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
+			String accountBudgetMode = "1".equals(aiBytedanceAdvertiserStrategy.getAccountBudgetMode()) ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
 			Result resultBudget = marketingService.updateBudget(token,accountBudgetMode,aiBytedanceAdvertiserStrategy.getAccountBudget());
 			/*if (!resultBudget.isSuccess()){
 				return Result.errorMsg(resultBudget.getMessage());
@@ -416,16 +416,16 @@ public class AiBytedanceAdvertiserStrategyController {
 			urlPath = LoadFileUtil.downLoadFromUrl(urlPath, "appFiles");
 			// android 根据附件地址 读取 apk 信息
 			map = ApkUtils.readAPK(urlPath);
-			if (!map.get("code").toString().equals("-1")){
+			if (!"-1".equals(map.get("code").toString())){
 				map.put("platform", "APP_ANDROID");
 			}else {
 				//ios
 				map = ApkUtils.readIPA(urlPath);
-				if (!map.get("code").toString().equals("-1")){
+				if (!"-1".equals(map.get("code").toString())){
 					map.put("platform", "APP_IOS");
 				}
 			}
-			if (map.get("code").toString().equals("-1")){
+			if ("-1".equals(map.get("code").toString())){
 				return Result.error(map.get("error").toString()+"请输入正确的链接。");
 			}
 			return Result.successMsg("根据下载链接获取应用包名成功", map);

+ 1 - 1
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/controller/BytedanceGeneralCopywriterController.java

@@ -288,7 +288,7 @@ public class BytedanceGeneralCopywriterController {
         try {
             ByteDanceGeneralCopywriter generalCopywriter = byteDanceGeneralCopywriterService.getById(id);
             if(null == generalCopywriter||generalCopywriter.getStatus() == 0){
-                return result.ok("此文案不存在或者已经被删除");
+                return Result.ok("此文案不存在或者已经被删除");
             }
             generalCopywriter.setStatus(0);
             generalCopywriter.setUpdateTime(new Date());

+ 1 - 1
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/controller/BytedanceReportController.java

@@ -273,7 +273,7 @@ public class BytedanceReportController {
 			if (result.isSuccess()){
 				ByteDanceAdvertisePlan byteDanceAdvertisePlan = new ByteDanceAdvertisePlan();
 				byteDanceAdvertisePlan.setId(adId);
-				byteDanceAdvertisePlan.setOptStatus(optStatus.equalsIgnoreCase("enable") ? "AD_STATUS_ENABLE" : "AD_STATUS_DISABLE");
+				byteDanceAdvertisePlan.setOptStatus("enable".equalsIgnoreCase(optStatus) ? "AD_STATUS_ENABLE" : "AD_STATUS_DISABLE");
 				//更新 表 计划状态
 				byteDanceAdvertisePlanService.updatePlanOrPackage(byteDanceAdvertisePlan);
 				return Result.successMsg(result.getMessage(), null);

+ 1 - 1
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/controller/BytedanceVideoSlogenInfoController.java

@@ -314,7 +314,7 @@ public class BytedanceVideoSlogenInfoController {
 			Result result = new Result();
 			List<BytedanceVideoSlogenInfo> videoSlogenInfoList = bytedanceVideoSlogenInfoService.getVideoSlogenBySlogenAndProjectId(slogan,projectId);
 			if(Check.isNull(videoSlogenInfoList)) {
-				return result.ok("此文案不存在或者已经被删除");
+				return Result.ok("此文案不存在或者已经被删除");
 			}
 			LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 			videoSlogenInfoList.forEach(videoSlogenInfo->{

+ 11 - 11
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java

@@ -391,7 +391,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                 JSONObject titleObject = new JSONObject();
                 titleObject.put("title",slogenInfo.getSlogan());
                 String creativeWordsIds = slogenInfo.getCreativeWordIds();
-                if(null!=creativeWordsIds&&!creativeWordsIds.trim().equals("")){
+                if(null!=creativeWordsIds&&!"".equals(creativeWordsIds.trim())){
                     JSONArray creativeWordsArray = JSON.parseArray(creativeWordsIds);
                     if(null!=creativeWordsArray&&!creativeWordsArray.isEmpty()){
                         titleObject.put("creative_word_ids",creativeWordsArray);
@@ -412,7 +412,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                     JSONObject titleObject = new JSONObject();
                     titleObject.put("title",byteDanceGeneralCopywriter.get(i).getTextCopywriter());
                     String creativeWordsIds = byteDanceGeneralCopywriter.get(i).getCreativeWordIds();
-                    if(null!=creativeWordsIds&&!creativeWordsIds.trim().equals("")){
+                    if(null!=creativeWordsIds&&!"".equals(creativeWordsIds.trim())){
                         JSONArray creativeWordsArray = JSON.parseArray(creativeWordsIds);
                         if(null!=creativeWordsArray&&!creativeWordsArray.isEmpty()){
                             titleObject.put("creative_word_ids",creativeWordsArray);
@@ -429,7 +429,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                     JSONObject titleObject = new JSONObject();
                     titleObject.put("title",byteDanceGeneralCopywriter.getTextCopywriter());
                     String creativeWordsIds = byteDanceGeneralCopywriter.getCreativeWordIds();
-                    if(null!=creativeWordsIds&&!creativeWordsIds.trim().equals("")){
+                    if(null!=creativeWordsIds&&!"".equals(creativeWordsIds.trim())){
                         JSONArray creativeWordsArray = JSON.parseArray(creativeWordsIds);
                         if(null!=creativeWordsArray&&!creativeWordsArray.isEmpty()){
                             titleObject.put("creative_word_ids",creativeWordsArray);
@@ -885,7 +885,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                 }
             }
         }
-        if(!Check.isNull(strategy.getAdDeviceType())&&!strategy.getAdDeviceType().trim().equals("NONE")){
+        if(!Check.isNull(strategy.getAdDeviceType())&&!"NONE".equals(strategy.getAdDeviceType().trim())){
             String[] deviceType = strategy.getAdDeviceType().split(",");
             if(deviceType.length>0){
                 params.put("device_type",deviceType);
@@ -900,7 +900,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         if(!Check.isNull(strategy.getAdHideIfConverted())){
             String hideIfConverted = strategy.getAdHideIfConverted();
             params.put("hide_if_converted",hideIfConverted);
-            if(hideIfConverted.equals("APP")||hideIfConverted.equals("CUSTOMER")){
+            if("APP".equals(hideIfConverted)|| "CUSTOMER".equals(hideIfConverted)){
                 if(!Check.isNull(strategy.getAdConvertedTimeDuration())){
                     params.put("converted_time_duration",strategy.getAdConvertedTimeDuration());
                 }
@@ -1113,7 +1113,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
             String campaignSufix = getRangeIndex(strategy.getDpLinkStartIndex(),strategy.getDpLinkEndIndex(),strategy.getCampaignAdCnt(),dplinkIndex);
             result = result + campaignSufix;
         }
-        if(null!=date&&!date.trim().equals("")) {
+        if(null!=date&&!"".equals(date.trim())) {
             result = result + "-" + date;
         }
 
@@ -1202,8 +1202,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
 
     private List<ByteDanceVideoInfo> getvideoOrImageInfoByCreateType(Long projectId,AiBytedanceAdvertiserStrategy strategy, String startTime, String endTime, Integer createType, Long videoCnt) {
         //横板视频 || 竖版视频
-        if (strategy.getCreativeImageMode().equalsIgnoreCase("CREATIVE_IMAGE_MODE_VIDEO")
-                || strategy.getCreativeImageMode().equalsIgnoreCase("CREATIVE_IMAGE_MODE_VIDEO_VERTICAL")){
+        if ("CREATIVE_IMAGE_MODE_VIDEO".equalsIgnoreCase(strategy.getCreativeImageMode())
+                || "CREATIVE_IMAGE_MODE_VIDEO_VERTICAL".equalsIgnoreCase(strategy.getCreativeImageMode())){
             //获取 视频 素材
             return getVideoInfoByCreateType(projectId,strategy,startTime,endTime,createType,videoCnt);
         }
@@ -1283,7 +1283,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         if (BytedanceConstant.UPDTYPE_BUDGET.equals(updAdStaOrCpaOrBudget.getType())) {
 
             //指定预算
-            if (updAdStaOrCpaOrBudget.getBudgetType().equals("2")){
+            if ("2".equals(updAdStaOrCpaOrBudget.getBudgetType())){
                 //  前者 < 后者
                 int a = new BigDecimal(updAdStaOrCpaOrBudget.getBudget()).compareTo(updAdStaOrCpaOrBudget.getCost().multiply(new BigDecimal(1.05)));
                 if (a == -1){
@@ -1295,7 +1295,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
             //账户预算 同步 头条
             //BUDGET_MODE_DAY-日预算
             // BUDGET_MODE_INFINITE-不限
-            String accountBudgetMode = updAdStaOrCpaOrBudget.getBudgetType().equals("1") ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
+            String accountBudgetMode = "1".equals(updAdStaOrCpaOrBudget.getBudgetType()) ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
             Result resultBudget = marketingService.updateBudget(token,accountBudgetMode,new BigDecimal(updAdStaOrCpaOrBudget.getBudget()));
            /* if (!resultBudget.isSuccess()){
                 return Result.error(resultBudget.getMessage());
@@ -1561,7 +1561,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         //账户预算 同步 头条
         //BUDGET_MODE_DAY-日预算
         // BUDGET_MODE_INFINITE-不限
-        String accountBudgetMode = aiBytedanceAdvertiserStrategy.getAccountBudgetMode().equals("1") ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
+        String accountBudgetMode = "1".equals(aiBytedanceAdvertiserStrategy.getAccountBudgetMode()) ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
         Result resultBudget = marketingService.updateBudget(token,accountBudgetMode,aiBytedanceAdvertiserStrategy.getAccountBudget());
        /* if (!resultBudget.isSuccess()){
             return Result.error(resultBudget.getMessage());

+ 1 - 0
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/service/impl/ByteDanceAdvertisePlanServiceImpl.java

@@ -107,6 +107,7 @@ public class ByteDanceAdvertisePlanServiceImpl extends ServiceImpl<ByteDanceAdve
         return resultMap;
     }
 
+    @Override
     public Map<String, Object> getAdvertiserPlanRejectReason(CtopOauthToken token, Long advertiserId, List<Long> adIds) {
 
         Map<String, Object> resultMap = new HashMap<>();

+ 2 - 1
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/service/impl/BytedanceRejectReasonServiceImpl.java

@@ -41,7 +41,8 @@ public class BytedanceRejectReasonServiceImpl implements BytedanceRejectReasonSe
 
     @Resource
     LowQualityRejectReasonMapper lowQualityRejectReasonMapper;
-    public void saveRejectReasonToDb(JSONArray jsonArray,Long accountId){
+    @Override
+    public void saveRejectReasonToDb(JSONArray jsonArray, Long accountId){
         for(int i=0; i<jsonArray.size(); i++){
             JSONObject jsonObject = jsonArray.getJSONObject(i);
             JSONObject ad_reject = jsonObject.getJSONObject("ad_reject");

+ 1 - 1
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/common/utils/Check.java

@@ -83,7 +83,7 @@ public class Check {
     public static JSONObject jsonRemoveEmpty(JSONObject jsonObject){
         JSONObject jsonResult = new JSONObject();
         for (Object key :jsonObject.keySet() ) {
-            if (!Check.isNull(jsonObject.get(key)) && !jsonObject.get(key).equals("")){
+            if (!Check.isNull(jsonObject.get(key)) && !"".equals(jsonObject.get(key))){
                 jsonResult.put(key.toString(), jsonObject.get(key));
             }
         }

+ 1 - 1
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/common/utils/ExcelUtil.java

@@ -117,7 +117,7 @@ public class ExcelUtil {
         }
         //如果当前单元格内容为日期类型,需要特殊处理
         String dataFormatString = cell.getCellStyle().getDataFormatString();
-        if(dataFormatString.equals("m/d/yy")){
+        if("m/d/yy".equals(dataFormatString)){
             cellValue = new SimpleDateFormat(DATE_FORMAT).format(cell.getDateCellValue());
             return cellValue;
         }

+ 1 - 1
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/report/service/impl/BytedanceAdvertiserHourlyReportServiceImpl.java

@@ -84,7 +84,7 @@ public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<Byte
          * 日期相差不为 0 则 展示 日报(每天数据总和)数据
          * 日期相差天数为0  则 展示 24小时 数据
          */
-        if (!lastTimeMap.get("daysBetween").equals("0")){
+        if (!"0".equals(lastTimeMap.get("daysBetween"))){
             // 账户 日报 阶段 数据
             nowCostList = bytedanceAdvertiserHourlyReportMapper.selectPlanCostInfoCount(accountId,null,startTime,endTime);
             lastCostList = bytedanceAdvertiserHourlyReportMapper.selectPlanCostInfoCount(accountId,null,lastTimeMap.get("lastTimeStart"),lastTimeMap.get("lastTimeEnd"));

+ 2 - 2
jeecg-boot-module-system/pom.xml

@@ -69,7 +69,7 @@
 			<artifactId>opencv</artifactId>
 			<version>4.2.0</version>
 			<scope>system</scope>
-			<systemPath>${project.basedir}/src/main/resources/lib/opencv-4.2.0.jar</systemPath>
+			<systemPath>${basedir}/../lib/opencv-4.2.0.jar</systemPath>
 		</dependency>
 		<!-- commons -->
 		<dependency>
@@ -99,7 +99,7 @@
 			<artifactId>jave</artifactId>
 			<version>1.0</version>
 			<scope>system</scope>
-			<systemPath>${project.basedir}/src/main/resources/lib/jave-1.0.jar</systemPath>
+			<systemPath>${project.basedir}/../lib/jave-1.0.jar</systemPath>
 		</dependency>
 
 		<dependency>

+ 4 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/controller/RuleSwitchController.java

@@ -28,14 +28,14 @@ public class RuleSwitchController {
         userAllocation.setAccountId(accountId);
         UpdateWrapper<UserAllocation> wrapper=new UpdateWrapper<>();
         //开启预警
-        if(switchType.equals("on")){
+        if("on".equals(switchType)){
             wrapper.set("monitoring_link",0);
             wrapper.setEntity(userAllocation);
             boolean update = userAllocationService.update(wrapper);
             if(update){
                 result.success("监测链接预警开启成功");
             }
-        }else if(switchType.equals("off")){
+        }else if("off".equals(switchType)){
             wrapper.set("monitoring_link",1);
             wrapper.setEntity(userAllocation);
             boolean update = userAllocationService.update(wrapper);
@@ -58,14 +58,14 @@ public class RuleSwitchController {
         userAllocation.setAccountId(accountId);
         UpdateWrapper<UserAllocation> wrapper=new UpdateWrapper<>();
         //开启预警
-        if(switchType.equals("on")){
+        if("on".equals(switchType)){
             wrapper.set("landing_page",0);
             wrapper.setEntity(userAllocation);
             boolean update = userAllocationService.update(wrapper);
             if(update){
                 result.success("落地页链接预警开启成功");
             }
-        }else if(switchType.equals("off")){
+        }else if("off".equals(switchType)){
             wrapper.set("landing_page",1);
             wrapper.setEntity(userAllocation);
             boolean update = userAllocationService.update(wrapper);

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/MaterialImageInfoServiceImpl.java

@@ -155,7 +155,7 @@ public class MaterialImageInfoServiceImpl extends ServiceImpl<MaterialImageInfoM
     @Override
     public List<MaterialImageInfo> getListByVideoSignature(String signature) {
         QueryWrapper<MaterialImageInfo>queryWrapper =new QueryWrapper<>();
-        if(null!=signature&&!signature.trim().equals("")){
+        if(null!=signature&&!"".equals(signature.trim())){
             queryWrapper.eq("video_id",signature);
         }
         return this.list(queryWrapper);

+ 2 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -19,6 +19,7 @@ import com.github.pagehelper.PageInfo;
 import com.tencentcloudapi.mps.v20190612.models.DescribeTaskDetailResponse;
 import it.sauronsoftware.jave.Encoder;
 import it.sauronsoftware.jave.EncoderException;
+import it.sauronsoftware.jave.MultimediaInfo;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.system.vo.LoginUser;
@@ -399,7 +400,7 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
                     String url = materialInfo.getUrl();
                     log.info("replaceUrl:{}", url);
                     String localUrl = null;
-                    it.sauronsoftware.jave.MultimediaInfo m = null;
+                    MultimediaInfo m = null;
                     FileInputStream fis = null;
                     try {
                         localUrl = LoadFileUtil.downLoadFromUrl(url, downloadUrl);

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/UserAllocationServiceImpl.java

@@ -129,7 +129,7 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
     @Override
     public List<JSONObject> getAccountIdsByUserId(String userId) {
         List<JSONObject> result = new ArrayList<>();
-        if (userId.equals("e9ca23d68d884d4ebb19d07889727dae")) {
+        if ("e9ca23d68d884d4ebb19d07889727dae".equals(userId)) {
             result = userAllocationMapper.getAllAccountIdsByMediaId("2");
         } else {
             result = userAllocationMapper.getAccountIdsByUserId(userId);

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/utils/StatusCode.java

@@ -26,7 +26,7 @@ public enum StatusCode {
     BYTEDANCE_PLAN_DATA_NOT_EXIST("此计划不存在或者已经被删除", -101, false),
     BYTEDANCE_ACCOUNT_DATA_NOT_EXIST("此账户尚未绑定或已停投", -101, false),
     COMMON_VERSION_NOT_EXIST("版本号不存在", -102, false),
-    BYTEDANCE_VIDEO_UPLOAD_FAIL("今日头条视频文件上传失败", -201, false),
+    BYTEDANCE_VIDEO_UPLOAD_FAIL("视频文件上传失败", -201, false),
     MATERIAL_UPLOAD_FAIL("素材文件上传失败", -201, false),
     IMAGE_NUMBER_SHORTAGE("今日头条图片文件上传失败", -202, false),
     BYTEDANCE_IMAGE_UPLOAD_FAIL("今日头条图片文件上传失败", -203, false),

+ 0 - 131
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/utils/TokenUtils.java

@@ -1,131 +0,0 @@
-package cn.com.ctop.common.module.utils;
-
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang.StringUtils;
-import org.apache.shiro.authc.AuthenticationException;
-import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.system.api.ISysBaseApi;
-import org.jeecg.common.system.util.JwtUtil;
-import org.jeecg.common.system.vo.LoginUser;
-import org.jeecg.common.util.RedisUtil;
-import org.jeecg.common.util.oConvertUtils;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * @Author scott
- * @Date 2019/9/23 14:12
- * @Description: 编程校验token有效性
- */
-@Slf4j
-public class TokenUtils {
-
-    /**
-     * 获取 request 里传递的 token
-     *
-     * @param request
-     * @return
-     */
-    public static String getTokenByRequest(HttpServletRequest request) {
-        String token = request.getParameter("token");
-        if (token == null) {
-            token = request.getHeader("X-Access-Token");
-        }
-        return token;
-    }
-
-    /**
-     * 验证Token
-     */
-    public static boolean verifyToken(String token, ISysBaseApi sysBaseApi, RedisUtil redisUtil) {
-        if (StringUtils.isBlank(token)) {
-            throw new AuthenticationException("token不能为空!");
-        }
-
-        // 解密获得username,用于和数据库进行对比
-        String username = JwtUtil.getUsername(token);
-        if (username == null) {
-            throw new AuthenticationException("token非法无效!");
-        }
-
-        // 查询用户信息
-        LoginUser user = sysBaseApi.getUserByName(username);
-        if (user == null) {
-            throw new AuthenticationException("用户不存在!");
-        }
-        // 判断用户状态
-        if (user.getStatus() != 1) {
-            throw new AuthenticationException("账号已被锁定,请联系管理员!");
-        }
-        // 校验token是否超时失效 & 或者账号密码是否错误
-        if (!jwtTokenRefresh(token, username, user.getPassword(), redisUtil)) {
-            throw new AuthenticationException("Token失效,请重新登录!");
-        }
-        return true;
-    }
-
-
-    /**
-     * 验证Token
-     */
-    public static boolean verifyToken(HttpServletRequest request, ISysBaseApi sysBaseApi, RedisUtil redisUtil) {
-        log.info(" -- url --" + request.getRequestURL());
-        String token = getTokenByRequest(request);
-
-        if (StringUtils.isBlank(token)) {
-            throw new AuthenticationException("token不能为空!");
-        }
-
-        // 解密获得username,用于和数据库进行对比
-        String username = JwtUtil.getUsername(token);
-        if (username == null) {
-            throw new AuthenticationException("token非法无效!");
-        }
-
-        // 查询用户信息
-        LoginUser user = sysBaseApi.getUserByName(username);
-        if (user == null) {
-            throw new AuthenticationException("用户不存在!");
-        }
-        // 判断用户状态
-        if (user.getStatus() != 1) {
-            throw new AuthenticationException("账号已被锁定,请联系管理员!");
-        }
-        // 校验token是否超时失效 & 或者账号密码是否错误
-        if (!jwtTokenRefresh(token, username, user.getPassword(), redisUtil)) {
-            throw new AuthenticationException("Token失效,请重新登录!");
-        }
-        return true;
-    }
-
-    /**
-     * 刷新token(保证用户在线操作不掉线)
-     * @param token
-     * @param userName
-     * @param passWord
-     * @param redisUtil
-     * @return
-     */
-    private static boolean jwtTokenRefresh(String token, String userName, String passWord, RedisUtil redisUtil) {
-        String cacheToken = String.valueOf(redisUtil.get(CommonConstant.PREFIX_USER_TOKEN + token));
-        if (oConvertUtils.isNotEmpty(cacheToken)) {
-            // 校验token有效性
-            if (!JwtUtil.verify(cacheToken, userName, passWord)) {
-                String newAuthorization = JwtUtil.sign(userName, passWord);
-                // 设置Toekn缓存有效时间
-                redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, newAuthorization);
-                redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME*2 / 1000);
-            }
-            //update-begin--Author:scott  Date:20191005  for:解决每次请求,都重写redis中 token缓存问题
-//            else {
-//                redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, cacheToken);
-//                // 设置超时时间
-//                redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME / 1000);
-//            }
-            //update-end--Author:scott  Date:20191005  for:解决每次请求,都重写redis中 token缓存问题
-            return true;
-        }
-        return false;
-    }
-
-}

+ 2 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaiShouAppInfoServiceImpl.java

@@ -61,9 +61,9 @@ public class AiKuaiShouAppInfoServiceImpl extends ServiceImpl<AiKuaiShouAppInfoM
             Workbook workbook = null;
             String fileName = myFile.getOriginalFilename();
             String substring = fileName.substring(fileName.lastIndexOf(".") + 1).toUpperCase();
-            if (substring.equals("XLS")) {
+            if ("XLS".equals(substring)) {
                 workbook = new HSSFWorkbook(myFile.getInputStream());
-            } else if (substring.equals("XLSX")) {
+            } else if ("XLSX".equals(substring)) {
                 workbook = new XSSFWorkbook(myFile.getInputStream());
             } else {
                 throw new Exception("文件不是Excel文件");

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouCreateCreativeServiceImpl.java

@@ -1581,7 +1581,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
         }
         Date date = new Date();
         String nowDate = DateUtils.formatDate(date, "yy-MMdd");
-        if (type.equals("plan")) {
+        if ("plan".equals(type)) {
             if (wildcard.contains("{{日期}}")) {
                 wildcard = wildcard.replace("{{日期}}", nowDate);
             } else {

+ 15 - 15
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouProjectCreateCreativeServiceImpl.java

@@ -1068,7 +1068,7 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
                         continue;
                     }
                     if (!Check.isNull(dir.getUserType()) && dir.getUserType() != 2) {
-                        if (dir.getUserType() != target.getUserType()) {
+                        if (!dir.getUserType().equals(target.getUserType())) {
                             continue;
                         }
                     }
@@ -1084,37 +1084,37 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
                         }
                     }
                     if (!Check.isNull(dir.getGender()) && dir.getGender() != 0) {
-                        if (dir.getGender() != target.getGender()) {
+                        if (!dir.getGender().equals(target.getGender())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getPlatformOs()) && dir.getPlatformOs() != 0) {
-                        if (dir.getPlatformOs() != target.getPlatformOs()) {
+                        if (!dir.getPlatformOs().equals(target.getPlatformOs())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getAndroidOsv()) && dir.getAndroidOsv() != 3) {
-                        if (dir.getAndroidOsv() != target.getAndroidOsv()) {
+                        if (!dir.getAndroidOsv().equals(target.getAndroidOsv())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getIosOsv()) && dir.getIosOsv() != 6) {
-                        if (dir.getIosOsv() != target.getIosOsv()) {
+                        if (!dir.getIosOsv().equals(target.getIosOsv())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getNetwork()) && dir.getNetwork() != 0) {
-                        if (dir.getNetwork() != target.getNetwork()) {
+                        if (!dir.getNetwork().equals(target.getNetwork())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getFilterConvertedLevel()) && dir.getFilterConvertedLevel() != 0) {
-                        if (dir.getFilterConvertedLevel() != target.getFilterConvertedLevel()) {
+                        if (!dir.getFilterConvertedLevel().equals(target.getFilterConvertedLevel())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getBusinessInterestType()) && dir.getBusinessInterestType() != 0) {
-                        if (dir.getBusinessInterestType() != target.getBusinessInterestType()) {
+                        if (!dir.getBusinessInterestType().equals(target.getBusinessInterestType())) {
                             continue;
                         }
                     }
@@ -1140,22 +1140,22 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
                         continue;
                     }
                     if (!Check.isNull(dir.getIsOpen()) && dir.getIsOpen() != 0) {
-                        if (dir.getIsOpen() != target.getIsOpen()) {
+                        if (!dir.getIsOpen().equals(target.getIsOpen())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getNoAgeBreak()) && dir.getNoAgeBreak() != 0) {
-                        if (dir.getNoAgeBreak() != target.getNoAgeBreak()) {
+                        if (!dir.getNoAgeBreak().equals(target.getNoAgeBreak())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getNoGenderBreak()) && dir.getNoGenderBreak() != 0) {
-                        if (dir.getNoGenderBreak() != target.getNoGenderBreak()) {
+                        if (!dir.getNoGenderBreak().equals(target.getNoGenderBreak())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getNoAreaBreak()) && dir.getNoAreaBreak() != 0) {
-                        if (dir.getNoAreaBreak() != target.getNoAreaBreak()) {
+                        if (!dir.getNoAreaBreak().equals(target.getNoAreaBreak())) {
                             continue;
                         }
                     }
@@ -1172,12 +1172,12 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
                         continue;
                     }
                     if (!Check.isNull(dir.getTimeType()) && dir.getTimeType() != -1) {
-                        if (dir.getTimeType() != target.getTimeType()) {
+                        if (!dir.getTimeType().equals(target.getTimeType())) {
                             continue;
                         }
                     }
                     if (!Check.isNull(dir.getStrengthType()) && dir.getStrengthType() != 0) {
-                        if (dir.getStrengthType() != target.getStrengthType()) {
+                        if (!dir.getStrengthType().equals(target.getStrengthType())) {
                             continue;
                         }
                     }
@@ -1453,7 +1453,7 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
         }
         Date date = new Date();
         String nowDate = DateUtils.formatDate(date, "yy-MMdd");
-        if (type.equals("plan")) {
+        if ("plan".equals(type)) {
             if (wildcard.contains("{{日期}}")) {
                 wildcard = wildcard.replace("{{日期}}", nowDate);
             } else {

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouStrategyTargetBaseServiceImpl.java

@@ -21,7 +21,7 @@ public class AiKuaishouStrategyTargetBaseServiceImpl extends ServiceImpl<AiKuais
     @Override
     public List<AiKuaishouStrategyTargetBase> listByType(String testDirection) {
         QueryWrapper<AiKuaishouStrategyTargetBase>queryWrapper =new QueryWrapper<>();
-        if(null!=testDirection&&!testDirection.trim().equals("")){
+        if(null!=testDirection&&!"".equals(testDirection.trim())){
             queryWrapper.eq("target_type",testDirection);
         }
         queryWrapper.eq("status",1);

+ 11 - 11
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiStrategyServiceImpl.java

@@ -124,7 +124,7 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
         String materialFixType = strategyTemplate.getMaterialFixType();
         Date campaignDate = new Date();
         String timestamp = DateUtils.formatDate(campaignDate,"yyyyMMddHHmmss");
-        if(scenes.equals("1")){
+        if("1".equals(scenes)){
             //素材+出价
             List<Long>getCapbids = splitCapBidByDomain(strategy.getCpaBidMin(),strategy.getCpaBidMax(),strategy.getStepSize());
             if(null == getCapbids||getCapbids.isEmpty()){
@@ -150,7 +150,7 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
             // 8、根据素材和出价,两层循环 创建组和创意
             for (Long item:getCapbids) {
                 //判定素材搭配方式
-                if(null!=materialFixType&&materialFixType.trim().equals("single")){
+                if(null!=materialFixType&& "single".equals(materialFixType.trim())){
                     // 选择素材,创建创意
                     for(KuaiShouVideoGet videoItem: fullVideos){
                         //拼装广告组参数
@@ -314,7 +314,7 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
             int unitCnt = 0;
             // 8、根据定向和素材,两层循环 创建组和创意
             for (AiKuaishouStrategyTargetBase item:getBases) {
-                if(null!=materialFixType&&materialFixType.trim().equals("single")){
+                if(null!=materialFixType&& "single".equals(materialFixType.trim())){
                     // 策略定向拆分数据,写入数据库
                     AiKuaishouStrategyTargetUnion targetUnion = new AiKuaishouStrategyTargetUnion(strategyMiddle.getId(),item.getId(),item.getTargetContent());
                     targetUnionService.save(targetUnion);
@@ -546,16 +546,16 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
 
     private String getStragyDefDomain(AiKuaishouStrategyTemplate strategyTemplate,KuaishouStrategy strategy){
         String definitionDomain = null;
-        if (strategyTemplate.getTestDirection().equals("age")){
+        if ("age".equals(strategyTemplate.getTestDirection())){
             definitionDomain = strategy.getAgesRange();
         }
-        if (strategyTemplate.getTestDirection().equals("gender")){
+        if ("gender".equals(strategyTemplate.getTestDirection())){
             definitionDomain = strategy.getGender().toString();
         }
-        if (strategyTemplate.getTestDirection().equals("region")){
+        if ("region".equals(strategyTemplate.getTestDirection())){
             definitionDomain = strategy.getRegion();
         }
-        if (strategyTemplate.getTestDirection().equals("operation_system")){
+        if ("operation_system".equals(strategyTemplate.getTestDirection())){
             definitionDomain = strategy.getPlatformOs().toString();
         }
         return definitionDomain;
@@ -606,28 +606,28 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
         // 设置定向内容
         JSONObject targetJsonObject = new JSONObject();
         //TODO 34
-        if (strategyTemplate.getTestDirection().equals("region")){
+        if ("region".equals(strategyTemplate.getTestDirection())){
             targetJsonObject.put("region",JSONArray.parseArray(item.getTargetContent()));
         } else {
             targetJsonObject.put("region",JSONArray.parseArray(strategy.getRegion()));
         }
 
         //TODO 5
-        if (strategyTemplate.getTestDirection().equals("age")){
+        if ("age".equals(strategyTemplate.getTestDirection())){
             targetJsonObject.put("ages_range",JSONArray.parseArray(item.getTargetContent()));
         } else{
             targetJsonObject.put("ages_range",JSONArray.parseArray(strategy.getAgesRange()));
         }
 
         //TODO 3
-        if (strategyTemplate.getTestDirection().equals("gender")){
+        if ("gender".equals(strategyTemplate.getTestDirection())){
             targetJsonObject.put("gender",item.getTargetContent());
         } else {
             targetJsonObject.put("gender",strategy.getGender());
         }
 
         //TODO
-        if (strategyTemplate.getTestDirection().equals("operation_system")){
+        if ("operation_system".equals(strategyTemplate.getTestDirection())){
             targetJsonObject.put("platform_os",item.getTargetContent());
         } else {
             targetJsonObject.put("platform_os",strategy.getPlatformOs());

+ 2 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/KuaishouAppPackageServiceImpl.java

@@ -84,9 +84,9 @@ public class KuaishouAppPackageServiceImpl extends ServiceImpl<KuaishouAppPackag
         Workbook workbook = null;
         String fileName = file.getOriginalFilename();
         String substring = fileName.substring(fileName.lastIndexOf(".") + 1).toUpperCase();
-        if (substring.equals("XLS")) {
+        if ("XLS".equals(substring)) {
             workbook = new HSSFWorkbook(file.getInputStream());
-        } else if (substring.equals("XLSX")) {
+        } else if ("XLSX".equals(substring)) {
             workbook = new XSSFWorkbook(file.getInputStream());
         } else {
             throw new Exception("文件不是Excel文件");

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouVideoGetServiceImpl.java

@@ -163,7 +163,7 @@ public class KuaiShouVideoGetServiceImpl extends ServiceImpl<KuaiShouVideoGetMap
             queryWrapper.eq("channel_type", channelType);
         }
 
-        if (null != appVersion && !appVersion.trim().equals("")) {
+        if (null != appVersion && !"".equals(appVersion.trim())) {
             queryWrapper.likeRight("photo_name", appVersion);
         }
         if (null != videoCnt && videoCnt != 0) {

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -967,7 +967,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     }
 
                 } else {
-                    if (code == 400001 && resultJson.getString("message").equals("/rest/openapi/v2/ad_unit/create调用已超日限,次日可恢复调用")) {
+                    if (code == 400001 && "/rest/openapi/v2/ad_unit/create调用已超日限,次日可恢复调用".equals(resultJson.getString("message"))) {
                         String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
                         String key = advertiserId + "_" + nowDate + "unit_create_overrun";
                         redisUtil.set(key, 1, 60 * 60 * 24);

+ 70 - 103
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/clean/service/impl/KuaiShouAccountCleanServiceImpl.java

@@ -53,7 +53,6 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
         SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
         Random rand = new Random();
         int id = 100000 + rand.nextInt(99900000);
-
         //设置6-8位数字
         kuaiShouAccountCleanTemplateInfo.setId(String.valueOf(id));
         //设置应用媒体 固定写死
@@ -63,8 +62,6 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
         //设置创建日期
         kuaiShouAccountCleanTemplateInfo.setCreateTime(sd.format(new Date()));
         try {
-            String userRealName = kuaishouAccountCleanTemplateMapper.getUserRealName(kuaiShouAccountCleanTemplateInfo.getCreateId());
-            kuaiShouAccountCleanTemplateInfo.setCreateUser(userRealName);
             kuaishouAccountCleanTemplateMapper.saveAccountCleanTemplate(kuaiShouAccountCleanTemplateInfo);
             result.success("创建模板成功");
         } catch (Exception e) {
@@ -77,11 +74,11 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
     /**
      * 查询模板列表
      *
-     * @param templateName 模板名称  createUser创建人
+     * @param templateId 模板id  createUser创建人
      * @return
      */
     @Override
-    public Result getTemplateList(String templateName, String createUser, String userId, String pageNum, String pageSize) {
+    public Result getTemplateList(String templateId, String createUser, String userId, String pageNum, String pageSize) {
         Result result = new Result();
         PageHelper pageHelper = new PageHelper();
         List<KuaiShouAccountCleanTemplateInfo> templateList = new ArrayList<>();
@@ -89,12 +86,12 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
             //查询当前登录人角色
             String roleCode = sysRoleService.getRoleCodeByUserId(userId);
             PageHelper.startPage(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
-            if (roleCode != null && roleCode.equals("admin")) {
+            if (roleCode != null && "admin".equals(roleCode)) {
                 //管理员查询全部
-                templateList = kuaishouAccountCleanTemplateMapper.getTemplateList(templateName, createUser, null);
+                templateList = kuaishouAccountCleanTemplateMapper.getTemplateList(templateId, createUser, null);
             } else {
                 //其他角色查询自己拥有的
-                templateList = kuaishouAccountCleanTemplateMapper.getTemplateList(templateName, createUser, userId);
+                templateList = kuaishouAccountCleanTemplateMapper.getTemplateList(templateId, createUser, userId);
             }
             PageInfo pageInfo = new PageInfo(templateList);
             result.success("查询成功");
@@ -188,10 +185,10 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
     public Result updateTemplateStatus(String templateId, String status) {
         Result result = new Result();
         String message = "修改";
-        if (status.equals("0")) {
+        if ("0".equals(status)) {
             message = "开启";
         }
-        if (status.equals("1")) {
+        if ("1".equals(status)) {
             message = "关闭";
         }
         try {
@@ -225,20 +222,11 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
     }
 
     @Override
-    public Result getCleanUpLog(String templateId, String userId, String pageNum, String pageSize) {
+    public Result getCleanUpLog(String userName, String accountId, String pageNum, String pageSize) {
         Result result = new Result();
-        List<KuaiShouAccountCleanLogInfo> cleanUpLog=new ArrayList<>();
         try {
-            //查询当前登录人角色
-            String roleCode = sysRoleService.getRoleCodeByUserId(userId);
             PageHelper.startPage(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
-            if (roleCode != null && roleCode.equals("admin")) {
-                cleanUpLog = kuaishouAccountCleanTemplateMapper.getCleanUpLog(templateId, null);
-            }else {
-                cleanUpLog = kuaishouAccountCleanTemplateMapper.getCleanUpLog(templateId, userId);
-            }
-            PageHelper.startPage(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
-
+            List<KuaiShouAccountCleanLogInfo> cleanUpLog = kuaishouAccountCleanTemplateMapper.getCleanUpLog(userName, accountId);
             PageInfo pageInfo = new PageInfo(cleanUpLog);
             result.success("查询成功");
             result.setResult(pageInfo);
@@ -264,7 +252,7 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
             //查询当前登录人角色
             String roleCode = sysRoleService.getRoleCodeByUserId(userId);
             PageHelper.startPage(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
-            if (roleCode != null && roleCode.equals("admin")) {
+            if (roleCode != null && "admin".equals(roleCode)) {
                 //管理员查询全部
                 templateList = kuaishouAccountCleanTemplateMapper.getMyselfTemplateList(accountId, userName, null);
             } else {
@@ -296,95 +284,74 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
             List<KuaiShouAccountCleanTemplateInfo> templateListBystatus = kuaishouAccountCleanTemplateMapper.getTemplateListBystatus();
             if (!templateListBystatus.isEmpty()) {
                 templateListBystatus.stream().forEach(ob -> {
-                    if(ob.getAccountId()!=null){
-                        //获取各项优化目标
-                        List<String> optimizationObjectiveList = Arrays.asList(ob.getOptimizationObjective().split(";"));
-                        //获取清理时间范围
-                        String cleanTime = ob.getCleanTime();
-                        //计算最早清理时间
-                        Calendar calendar = Calendar.getInstance();//此时打印它获取的是系统当前时间
-                        calendar.add(Calendar.DATE, -Integer.parseInt(cleanTime));
-                        String startDate = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
-                        //查询符合模板规则的组
-                        List<String> groupMessage = kuaishouAccountCleanTemplateMapper.getGroupMessage(ob, optimizationObjectiveList, startDate);
-                        AtomicReference<Boolean> falg = new AtomicReference<>(true);
-                        if (!groupMessage.isEmpty()) {
-                            //获取Token
-                            CtopOauthToken ctopOauthToken = ctopOauthTokenMapper.selectByAccountId(Long.parseLong(ob.getAccountId()));
-                            if (ctopOauthToken != null) {
-                                groupMessage.stream().forEach(item -> {
-                                    //修改广告组状态
-                                    Map<String, Object> resultMap = iKuaiShouUpdateService.updateUnitStatus(ctopOauthToken.getAccessToken(), Long.parseLong(ob.getAccountId()), Long.parseLong(item), Integer.parseInt(ob.getPerformOperations()), null);
-                                    Boolean resultFlag = (Boolean) resultMap.get("success");
-                                    //判断有没有失败
-                                    if (!resultFlag) {
-                                        falg.set(false);
-                                    }
-                                });
+                    //获取各项优化目标
+                    List<String> optimizationObjectiveList = Arrays.asList(ob.getOptimizationObjective().split(";"));
+                    //获取清理时间范围
+                    String cleanTime = ob.getCleanTime();
+                    //计算最早清理时间
+                    Calendar calendar = Calendar.getInstance();//此时打印它获取的是系统当前时间
+                    calendar.add(Calendar.DATE, -Integer.parseInt(cleanTime));
+                    String startDate = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
+                    //查询符合模板规则的组
+                    List<String> groupMessage = kuaishouAccountCleanTemplateMapper.getGroupMessage(ob, optimizationObjectiveList, startDate);
+                    AtomicReference<Boolean> falg = new AtomicReference<>(true);
+                    if (!groupMessage.isEmpty()) {
+                        //获取Token
+                        CtopOauthToken ctopOauthToken = ctopOauthTokenMapper.selectByAccountId(Long.parseLong(ob.getAccountId()));
+                        if (ctopOauthToken != null) {
+                            groupMessage.stream().forEach(item -> {
+                                //修改广告组状态
+                                Map<String, Object> resultMap = iKuaiShouUpdateService.updateUnitStatus(ctopOauthToken.getAccessToken(), Long.parseLong(ob.getAccountId()), Long.parseLong(item), Integer.parseInt(ob.getPerformOperations()), null);
+                                Boolean resultFlag = (Boolean) resultMap.get("success");
+                                //判断有没有失败
+                                if (!resultFlag) {
+                                    falg.set(false);
+                                }
+                            });
 
-                            }
                         }
-                        if (!groupMessage.isEmpty() && falg.get()) {
-                            //修改成功插入日志记录
-                            KuaiShouAccountCleanLogInfo kuaiShouAccountCleanLogInfo = new KuaiShouAccountCleanLogInfo();
-                            //设置账户id
-                            kuaiShouAccountCleanLogInfo.setAccountId(ob.getAccountId());
-                            // 1-投放、2-暂停、3-删除
-                            kuaiShouAccountCleanLogInfo.setOperationType(ob.getPerformOperations());
-                            //设置运营
-                            Map<String, String> map = kuaishouAccountCleanTemplateMapper.getUserNameByAccountId(ob.getAccountId());
-                            String authName = "";
-                            if (map != null) {
-                                kuaiShouAccountCleanLogInfo.setUserName(map.get("userName"));
-                                authName = map.get("authName");
-                            }
-                            //设置时间
-                            kuaiShouAccountCleanLogInfo.setCreateTime(sd.format(new Date()));
-                            StringBuilder unitIds = new StringBuilder();
-                            groupMessage.stream().forEach(unid -> {
-                                unitIds.append(unid).append(",");
-                            });
-                            //操作类型
-                            String operationType = null;
-                            if (ob.getPerformOperations().equals("2")) {
-                                operationType = "暂停";
-                            }
-                            if (ob.getPerformOperations().equals("3")) {
-                                operationType = "删除";
-                            }
-                            //执行信息
-                            String textMessage = "清理规则执行:  账户:" + ob.getAccountId() + ", 授权名称: " + authName + ",推广组:" + unitIds + "已经被清理规则" + operationType;
-                            kuaiShouAccountCleanLogInfo.setExecutiveInformation(textMessage);
-                            kuaiShouAccountCleanLogInfo.setTemplateId(ob.getId());
-                            kuaiShouAccountCleanLogInfo.setCreateTemplateId(ob.getCreateId());
-                            kuaishouAccountCleanTemplateMapper.saveCleamLog(kuaiShouAccountCleanLogInfo);
+                    }
+                    if (!groupMessage.isEmpty() && falg.get()) {
+                        //修改成功插入日志记录
+                        KuaiShouAccountCleanLogInfo kuaiShouAccountCleanLogInfo = new KuaiShouAccountCleanLogInfo();
+                        //设置账户id
+                        kuaiShouAccountCleanLogInfo.setAccountId(ob.getAccountId());
+                        // 1-投放、2-暂停、3-删除
+                        kuaiShouAccountCleanLogInfo.setOperationType(ob.getPerformOperations());
+                        //设置运营
+                        Map<String, String> map = kuaishouAccountCleanTemplateMapper.getUserNameByAccountId(ob.getAccountId());
+                        String authName = "";
+                        if (map != null) {
+                            kuaiShouAccountCleanLogInfo.setUserName(map.get("userName"));
+                            authName = map.get("authName");
+                        }
+                        //设置时间
+                        kuaiShouAccountCleanLogInfo.setCreateTime(sd.format(new Date()));
+                        StringBuilder unitIds = new StringBuilder();
+                        groupMessage.stream().forEach(unid -> {
+                            unitIds.append(unid).append(",");
+                        });
+                        //操作类型
+                        String operationType = null;
+                        if ("2".equals(ob.getPerformOperations())) {
+                            operationType = "暂停";
                         }
+                        if ("3".equals(ob.getPerformOperations())) {
+                            operationType = "删除";
+                        }
+                        //执行信息
+                        String textMessage = "清理规则执行:  账户:" + ob.getAccountId() + ", 授权名称: " + authName + ",推广组:" + unitIds + "已经被清理规则" + operationType;
+                        kuaiShouAccountCleanLogInfo.setExecutiveInformation(textMessage);
+                        kuaishouAccountCleanTemplateMapper.saveCleamLog(kuaiShouAccountCleanLogInfo);
                     }
+
                 });
             }
 
-            result.success("执行计划成功");
+            result.success("修改成功");
         } catch (Exception e) {
-            log.info("执行计划失败:{}", e.toString());
-            result.error500("执行计划失败");
-        }
-        return result;
-    }
-    /**
-     * 根据模板名称查询
-     *
-     * @param templateName
-     * @return
-     */
-    @Override
-    public Result getTemplateName(String templateName) {
-        Result result = new Result();
-        try {
-            int number = kuaishouAccountCleanTemplateMapper.getTemplateName(templateName);
-            result.setResult(number);
-        }catch (Exception e){
-            log.info("查询失败:{}", e.toString());
-            result.error500("查询失败");
+            log.info("修改失败:{}", e.toString());
+            result.error500("修改失败");
         }
         return result;
     }

+ 2 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/dimension/controller/KuaiShouDimensionStrategyController.java

@@ -93,7 +93,7 @@ public class KuaiShouDimensionStrategyController {
             KuaiShouDimensionStrategy one = kuaiShouDimensionStrategyService.getOne(dimensionStrategyQueryWrapper);
             Boolean trueOrFalse = false;
             if (!Check.isNull(one)) {
-                if (one.getId() != id) {
+                if (!one.getId().equals(id)) {
                     trueOrFalse = true;
                 }
 
@@ -186,7 +186,7 @@ public class KuaiShouDimensionStrategyController {
         queryWrapper.orderByDesc("create_time");
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         String roleCode = sysRoleService.getRoleCodeByUserId(sysUser.getId());
-        if (!roleCode.equals("admin")) {
+        if (!"admin".equals(roleCode)) {
             queryWrapper.eq("user_id", sysUser.getId());
         }
 

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/dimension/service/impl/KuaiShouDimensionStrategyServiceImpl.java

@@ -412,7 +412,7 @@ public class KuaiShouDimensionStrategyServiceImpl extends ServiceImpl<KuaiShouDi
                     String intention_target = variableJson.getString("intention_target");
                     if (!Check.isNull(intention_target)) {
                         if (!"unlimited".equals(intention_target)) {
-                            if (intention_target.equals("1")) {
+                            if ("1".equals(intention_target)) {
                                 unit.setIntentionTarget(true);
                             } else {
                                 unit.setIntentionTarget(false);

+ 21 - 380
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/label/service/impl/MaterialLabelServiceImpl.java

@@ -1,19 +1,15 @@
 package cn.com.ctop.kuaishou.modules.label.service.impl;
 
-import cn.com.ctop.common.module.entity.TagInfo;
-import cn.com.ctop.common.module.utils.ElasticsearchUtil;
-import cn.com.ctop.kuaishou.modules.label.entity.LabelStandardInfo;
-import cn.com.ctop.kuaishou.modules.label.entity.MaterialLabelInfo;
 import cn.com.ctop.kuaishou.modules.label.mapper.MaterialLabelMapper;
 import cn.com.ctop.kuaishou.modules.label.service.MaterialLabelService;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.Calendar;
+import java.util.List;
 
 /**
  * @Description: 素材标签
@@ -29,9 +25,6 @@ public class MaterialLabelServiceImpl implements MaterialLabelService {
     @Resource
     MaterialLabelMapper materialLabelMapper;
 
-    @Autowired
-    ElasticsearchUtil elasticsearchUtil;
-
 
     /**
      * 清洗各素材指标入库
@@ -40,400 +33,48 @@ public class MaterialLabelServiceImpl implements MaterialLabelService {
      * @return
      */
     @Override
-    public Result filterMaterial(String type) {
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+    public Result filterMaterial() {
 
-        Result result = new Result();
         try {
-            List<String> materiaSignature = new ArrayList<>();
-            if (type.equals("1")) {
-                //查询所有素材标签
-                materiaSignature = materialLabelMapper.getMateriaSignature();
-            } else {
-                //查询增量素材
-                Calendar calc = Calendar.getInstance();
-                calc.setTime(new Date());
-                calc.add(Calendar.DAY_OF_MONTH, -1);
-                materiaSignature = materialLabelMapper.getMateriaSignatureCharge(sdf.format(calc.getTime()));
-            }
-
-            if (!materiaSignature.isEmpty()) {
-                materiaSignature.stream().forEach(str -> {
-                    if (!str.isEmpty()) {
+            //查询所有素材标签
+            List<String> materiaSignature = materialLabelMapper.getMateriaSignature();
+            if(!materiaSignature.isEmpty()){
+                materiaSignature.stream().forEach(str->{
+                    if(!str.isEmpty()){
                         //获取素材产生消耗的最早日期
                         String materialFirstDate = materialLabelMapper.getMaterialFirstDate(str);
-                        if (materialFirstDate != null) {
-                            //获取30天之后的日期
-                            String afterDate = getDateByNumber(materialFirstDate, 30);
-                            //获取2天之后的日期
-                            String afterDate2 = getDateByNumber(materialFirstDate, 2);
-                            //根据日期查询素材各项指标入库
-                            LabelStandardInfo labermessage = materialLabelMapper.getLabermessage(str, materialFirstDate, afterDate);
-                            if (labermessage != null) {
-                                //查询两天内数据
-                                LabelStandardInfo labermessageByTwoDays = materialLabelMapper.getLabermessageByTwoDays(str, materialFirstDate, afterDate2);
-                                if (labermessageByTwoDays.getActivationTwoDays() != null) {
-                                    labermessage.setActivationTwoDays(labermessageByTwoDays.getActivationTwoDays());
-                                }
-                                if (labermessageByTwoDays.getFormCountTwoDays() != null) {
-                                    labermessage.setFormCountTwoDays(labermessageByTwoDays.getFormCountTwoDays());
-                                }
-                                labermessage.setSignature(str);
-                                labermessage.setChargeDate(materialFirstDate);
-                                labermessage.setCreateTime(sdf.format(new Date()));
-                                labermessage.setUpdateTime(sdf.format(new Date()));
-                                //查询素材标签标准表是否存在此素材
-                                LabelStandardInfo materialRecord = materialLabelMapper.getMaterialRecord(str);
-                                if (materialRecord != null) {
-                                    //存在则更新
-                                    materialLabelMapper.updateMaterialRecord(labermessage);
-                                } else {
-                                    //不存在插入
-                                    materialLabelMapper.saveLabelMessage(labermessage);
-                                }
-
-                            }
-                        }
-
+                        //获取30天之后的日期
+                        String afterDate = getDateByNumber(materialFirstDate, -30);
+                        //查询素材各项指标入库
+                        
                     }
 
                 });
             }
-            result.success("success");
-        } catch (Exception e) {
-            result.error500("error");
-            log.info("清洗标签指标数据错误:{}", e.toString());
-        }
-
-        return result;
-    }
-
-    /**
-     * 根据素材指标制定素材标签
-     *
-     * @param
-     * @return
-     */
-    @Override
-    public Result materialSpecificationLabel(String type) {
-        Result result = new Result();
-        Map<String, String> tgaMap = new HashMap<>();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-        List<LabelStandardInfo> allMaterialData = new ArrayList<>();
-        try {
-            String date = sdf.format(new Date());
-            //查询所有标签
-            List<TagInfo> tagInfo = materialLabelMapper.getTagInfo();
-            if (!tagInfo.isEmpty()) {
-                tagInfo.stream().forEach(tag -> {
-                    tgaMap.put(tag.getTagName(), tag.getTagCode() + ";" + tag.getId());
-                });
-            }
-            if (type.equals("0")) {
-                //查询全量素材标签判断标准数据
-                allMaterialData = materialLabelMapper.getAllMaterialData();
-            } else {
-                allMaterialData = materialLabelMapper.getAllMaterialDataCharge(sdf.format(new Date()));
-            }
-
-            if (!allMaterialData.isEmpty()) {
-                allMaterialData.stream().forEach(obj -> {
-                    //三十天内累计激活数
-                    String activationThirtyDays = obj.getActivationThirtyDays();
-                    //两天内累计激活数
-                    String activationTwoDays = obj.getActivationTwoDays();
-                    //30天内表单提交数
-                    String formCountThirtyDays = obj.getFormCountThirtyDays();
-                    //两天内表单提交数
-                    String formCountTwoDays = obj.getFormCountTwoDays();
-                    //30天内3s完播率
-                    String play3sRatio = obj.getPlay3sRatio();
-                    //30天内转化率
-                    String conversionRatio = obj.getConversionRatio();
-                    //30天内行为率
-                    String behaviorRation = obj.getBehaviorRation();
-                    //30天内次留率
-                    String eventNextDayStayRatio = obj.getEventNextDayStayRatio();
-                    //应用下载--合格素材
-                    if (activationThirtyDays != null && formCountThirtyDays != null && Integer.parseInt(activationThirtyDays) >= 100 && Integer.parseInt(formCountThirtyDays) == 0) {
-                        String[] split = tgaMap.get("应用下载--合格素材").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载--合格素材", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    //应应用下载--起量快
-                    if (activationTwoDays != null && formCountTwoDays != null && Integer.parseInt(activationTwoDays) >= 96 && Integer.parseInt(formCountTwoDays) == 0) {
-                        String[] split = tgaMap.get("应用下载--起量快").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载--起量快", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    //应用下载-高-3s完播率
-                    if (activationThirtyDays != null && play3sRatio != null && Integer.parseInt(activationThirtyDays) >= 100 && Double.parseDouble(play3sRatio) > 0.657) {
-                        String[] split = tgaMap.get("应用下载-高-3s完播率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载-高-3s完播率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 应用下载-低-3s完播率
-                    if (activationThirtyDays != null && play3sRatio != null && Integer.parseInt(activationThirtyDays) >= 100 && Double.parseDouble(play3sRatio) < 0.132) {
-                        String[] split = tgaMap.get("应用下载-低-3s完播率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载-低-3s完播率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 应用下载-高-转化率
-                    if (activationThirtyDays != null && conversionRatio != null && Integer.parseInt(activationThirtyDays) >= 100 && Double.parseDouble(conversionRatio) > 0.366) {
-                        String[] split = tgaMap.get("应用下载-高-转化率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载-高-转化率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 应用下载-低-转化率
-                    if (activationThirtyDays != null && conversionRatio != null && Integer.parseInt(activationThirtyDays) >= 100 && Double.parseDouble(conversionRatio) < 0.009) {
-                        String[] split = tgaMap.get("应用下载-低-转化率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载-低-转化率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 应用下载-高-行为率
-                    if (activationThirtyDays != null && behaviorRation != null && Integer.parseInt(activationThirtyDays) >= 100 && Double.parseDouble(behaviorRation) > 0.059) {
-                        String[] split = tgaMap.get("应用下载-高-行为率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载-高-行为率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 应用下载-低-行为率
-                    if (activationThirtyDays != null && behaviorRation != null && Integer.parseInt(activationThirtyDays) >= 100 && Double.parseDouble(behaviorRation) < 0.003) {
-                        String[] split = tgaMap.get("应用下载-低-行为率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载-低-行为率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 应用下载-高-次留率
-                    if (activationThirtyDays != null && eventNextDayStayRatio != null && Integer.parseInt(activationThirtyDays) >= 100 && Double.parseDouble(eventNextDayStayRatio) > 0.453) {
-                        String[] split = tgaMap.get("应用下载-高-次留率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载-高-次留率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 应用下载-低-次留率
-                    if (activationThirtyDays != null && eventNextDayStayRatio != null && Integer.parseInt(activationThirtyDays) >= 100 && Double.parseDouble(eventNextDayStayRatio) == 0.000) {
-                        String[] split = tgaMap.get("应用下载-低-次留率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "应用下载-低-次留率", split[0], split[1], "1", date);
-                        }
-                    }
-
-
-                    // 表单提交--合格素材
-                    if (formCountThirtyDays != null && activationThirtyDays != null && Integer.parseInt(formCountThirtyDays) >= 20 && Integer.parseInt(activationThirtyDays) == 0) {
-                        String[] split = tgaMap.get("表单提交--合格素材").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "表单提交--合格素材", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 表单提交--起量快
-                    if (formCountTwoDays != null && activationTwoDays != null && Integer.parseInt(formCountTwoDays) >= 30 && Integer.parseInt(activationTwoDays) == 0) {
-                        String[] split = tgaMap.get("表单提交--起量快").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "表单提交--起量快", split[0], split[1], "1", date);
-                        }
-                    }
+        }catch (Exception e){
 
-                    // 表单提交-低-3s完播率
-                    if (formCountThirtyDays != null && play3sRatio != null && Integer.parseInt(formCountThirtyDays) >= 20 && Double.parseDouble(play3sRatio) < 0.157) {
-                        String[] split = tgaMap.get("表单提交-低-3s完播率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "表单提交-低-3s完播率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 表单提交-高-3s完播率
-                    if (formCountThirtyDays != null && play3sRatio != null && Integer.parseInt(formCountThirtyDays) >= 20 && Double.parseDouble(play3sRatio) > 0.515) {
-                        String[] split = tgaMap.get("表单提交-高-3s完播率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "表单提交-高-3s完播率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 表单提交-低-转化率
-                    if (formCountThirtyDays != null && conversionRatio != null && Integer.parseInt(formCountThirtyDays) >= 20 && Double.parseDouble(conversionRatio) < 0.017) {
-                        String[] split = tgaMap.get("表单提交-低-转化率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "表单提交-低-转化率", split[0], split[1], "1", date);
-                        }
-                    }
-
-
-                    // 表单提交-高-转化率
-                    if (formCountThirtyDays != null && conversionRatio != null && Integer.parseInt(formCountThirtyDays) >= 20 && Double.parseDouble(conversionRatio) > 0.159) {
-                        String[] split = tgaMap.get("表单提交-高-转化率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "表单提交-高-转化率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 表单提交-低-行为率
-                    if (formCountThirtyDays != null && behaviorRation != null && Integer.parseInt(formCountThirtyDays) >= 20 && Double.parseDouble(behaviorRation) < 0.004) {
-                        String[] split = tgaMap.get("表单提交-低-行为率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "表单提交-低-行为率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                    // 表单提交-高-行为率
-                    if (formCountThirtyDays != null && behaviorRation != null && Integer.parseInt(formCountThirtyDays) >= 20 && Double.parseDouble(behaviorRation) > 0.015) {
-                        String[] split = tgaMap.get("表单提交-高-行为率").split(";");
-                        int count = materialLabelMapper.getDataByCodeAndSignature(obj.getSignature(), split[0]);
-                        //次素材没有打此标签
-                        if (count == 0) {
-                            materialLabelMapper.saveMaterialTag(obj.getSignature(), "表单提交-高-行为率", split[0], split[1], "1", date);
-                        }
-                    }
-
-                });
-            }
-            result.success("success");
-        } catch (Exception e) {
-            result.error500("error");
-            log.info("素材规定标签失败:{}", e.toString());
         }
-        return result;
 
-    }
 
-    /**
-     * 同步标签到ES
-     *
-     * @param
-     * @return
-     */
-    @Override
-    public Result SynchronousLabel(String type) {
-        Result result = new Result();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-        List<MaterialLabelInfo> materialLabelData = new ArrayList<>();
-        try {
-            if (type.equals("0")) {
-                //查询所有素材
-                materialLabelData = materialLabelMapper.getMaterialLabelData(null);
-            } else {
-                //查询增量素材
-                materialLabelData = materialLabelMapper.getMaterialLabelData(sdf.format(new Date()));
-            }
-            //创建索引
-            boolean indexIfNotExist = elasticsearchUtil.createIndexIfNotExist(MaterialLabelInfo.class);
-            //同步ES
-            if (materialLabelData.size() > 0) {
-                //每5000条数据, 拆成一个list
-                List<List<MaterialLabelInfo>> repayEntityVoList = getSubList(100, materialLabelData);
-                if (!repayEntityVoList.isEmpty()) {
-                    for (List<MaterialLabelInfo> materialLabelInfos : repayEntityVoList) {
-                        elasticsearchUtil.batchSaveOrUpdate(materialLabelInfos);
-                        //防止es队列满
-                        Thread.sleep(500);
-                    }
-                }
-            }
-            result.setSuccess(true);
-            log.info("同步标签至es成功:{}");
-        } catch (Exception e) {
-            result.setSuccess(false);
-            log.info("同步标签至ES失败:{}", e.toString());
-        }
-        return result;
+        return null;
     }
-
-
     /**
      * 获取指定日期number天之后之前的日期
      *
      * @param
      * @return
      */
-    public String getDateByNumber(String date, int number) {
+    public String getDateByNumber(String date,int number){
         Calendar calc = Calendar.getInstance();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-        String AfterDate = null;
+        SimpleDateFormat sdf  = new SimpleDateFormat("yyyy-MM-dd");
+        String AfterDate=null;
         try {
             calc.setTime(sdf.parse(date));
-            calc.add(Calendar.DAY_OF_MONTH, number);
-            AfterDate = sdf.format(calc.getTime());
-        } catch (Exception e) {
-            log.info("获取日期失败:{}", e.toString());
+            calc.add(Calendar.DATE, number);
+            AfterDate=sdf.format(calc.getTime());
+        }catch (Exception e){
+            log.info("获取日期失败:{}",e.toString());
         }
         return AfterDate;
     }
-
-
-    /**
-     * 将list拆分成指定数量的小list
-     * 注: 使用的subList方式,返回的是list的内部类,不可做元素的删除,修改,添加操作
-     *
-     * @param length 数量
-     * @param list   大list
-     */
-    public List<List<MaterialLabelInfo>> getSubList(int length, List<MaterialLabelInfo> list) {
-        int size = list.size();
-        int temp = size / length + 1;
-        boolean result = size % length == 0;
-        List<List<MaterialLabelInfo>> subList = new ArrayList<>();
-        for (int i = 0; i < temp; i++) {
-            if (i == temp - 1) {
-                if (result) {
-                    break;
-                }
-                subList.add(list.subList(length * i, size));
-            } else {
-                subList.add(list.subList(length * i, length * (i + 1)));
-            }
-        }
-        return subList;
-    }
-
 }

+ 7 - 7
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/EtlKuaishouVideoInfoServiceImpl.java

@@ -75,13 +75,13 @@ public class EtlKuaishouVideoInfoServiceImpl extends ServiceImpl<EtlKuaishouVide
                         JSONObject ascription = ascriptionService.getDetailByCode(videoGet.getSignature());
                         if(null!=ascription){
                             String clipId = ascription.getString("clipId");
-                            if(null!=clipId&&!clipId.trim().equals("")){
+                            if(null!=clipId&&!"".equals(clipId.trim())){
                                 etlKuaishouVideoInfo.setClipId(clipId);
                                 //根据id查询剪辑所属的设计负责人
                                 SysUser user = sysUserService.getById(clipId);
                                 if(null!=user){
                                     String roleCode = sysUserService.getRoleCodeByUserId(user.getId());
-                                    if(null!=roleCode&&roleCode.trim().equals("designTeamLeader")){
+                                    if(null!=roleCode&& "designTeamLeader".equals(roleCode.trim())){
                                         etlKuaishouVideoInfo.setDesignTeamLeaderId(user.getId());
                                         etlKuaishouVideoInfo.setDesignTeamLeaderName(user.getRealname());
                                     }else{
@@ -91,23 +91,23 @@ public class EtlKuaishouVideoInfoServiceImpl extends ServiceImpl<EtlKuaishouVide
                                 }
                             }
                             String clipName = ascription.getString("clipName");
-                            if(null!=clipName&&!clipName.trim().equals("")){
+                            if(null!=clipName&&!"".equals(clipName.trim())){
                                 etlKuaishouVideoInfo.setClipName(clipName);
                             }
                             String planId = ascription.getString("planId");
-                            if(null!=planId&&!planId.trim().equals("")){
+                            if(null!=planId&&!"".equals(planId.trim())){
                                 etlKuaishouVideoInfo.setPlanId(planId);
                             }
                             String planName = ascription.getString("planName");
-                            if(null!=planName&&!planName.trim().equals("")){
+                            if(null!=planName&&!"".equals(planName.trim())){
                                 etlKuaishouVideoInfo.setPlanName(planName);
                             }
                             String shotId = ascription.getString("shotId");
-                            if(null!=shotId&&!shotId.trim().equals("")){
+                            if(null!=shotId&&!"".equals(shotId.trim())){
                                 etlKuaishouVideoInfo.setShotId(shotId);
                             }
                             String shotName = ascription.getString("shotName");
-                            if(null!=shotName&&!shotName.trim().equals("")){
+                            if(null!=shotName&&!"".equals(shotName.trim())){
                                 etlKuaishouVideoInfo.setShotName(shotName);
                             }
                         }

+ 2 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsNewGroupReportCtrl.java

@@ -48,7 +48,7 @@ public class KsNewGroupReportCtrl {
         JSONArray accountIds = requestBody.getJSONArray("accountIds");
         String userId = requestBody.getString("userId");
         //TODO 没有维护快手事业部负责人角色,增加判断
-        if (userId.equals("b73c6a1cafb4469a8c0081acd50f703b") || userId.equals("228c45f913924639bf20c79ce5dadb16")) {
+        if ("b73c6a1cafb4469a8c0081acd50f703b".equals(userId) || "228c45f913924639bf20c79ce5dadb16".equals(userId)) {
             accountIds = newPlanReportService.getAccountIdsByMedia();
         } else {
             if (!userId.isEmpty()) {
@@ -109,7 +109,7 @@ public class KsNewGroupReportCtrl {
         JSONArray accountIds = requestBody.getJSONArray("accountIds");
         String userId = requestBody.getString("userId");
         //TODO 没有维护快手事业部负责人角色,增加判断
-        if (userId.equals("6b4c821adc414dc8b7718ab63ccbfcaf")) {
+        if ("6b4c821adc414dc8b7718ab63ccbfcaf".equals(userId)) {
             accountIds = newPlanReportService.getAccountIdsByMedia();
         } else {
             if (!userId.isEmpty()) {

+ 2 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsNewPlanReportCtrl.java

@@ -44,7 +44,7 @@ public class KsNewPlanReportCtrl {
         JSONArray accountIds = requestBody.getJSONArray("accountIds");
         String userId = requestBody.getString("userId");
         //TODO 没有维护快手事业部负责人角色,增加判断
-        if (userId.equals("6b4c821adc414dc8b7718ab63ccbfcaf")) {
+        if ("6b4c821adc414dc8b7718ab63ccbfcaf".equals(userId)) {
             accountIds = newPlanReportService.getAccountIdsByMedia();
         } else {
             if (!userId.isEmpty()) {
@@ -108,7 +108,7 @@ public class KsNewPlanReportCtrl {
         JSONArray accountIds = requestBody.getJSONArray("accountIds");
         String userId = requestBody.getString("userId");
         //TODO 没有维护快手事业部负责人角色,增加判断
-        if (userId.equals("6b4c821adc414dc8b7718ab63ccbfcaf")) {
+        if ("6b4c821adc414dc8b7718ab63ccbfcaf".equals(userId)) {
             accountIds = newPlanReportService.getAccountIdsByMedia();
         } else {
             if (!userId.isEmpty()) {

+ 3 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/EtlKuaiShouNewlyServiceImpl.java

@@ -88,11 +88,11 @@ public class EtlKuaiShouNewlyServiceImpl extends ServiceImpl<EtlKuaiShouNewlyMap
                     addNewly.setUserName(userMap.get(allocation.getUserId()));
                 }
                 Integer count = 0;
-                if (newType.equals("campaign")) {
+                if ("campaign".equals(newType)) {
                     count = campaignService.getNewDataByAccountIdAndDate(allocation.getAccountId(), statDate);
-                } else if (newType.equals("unit")) {
+                } else if ("unit".equals(newType)) {
                     count = groupService.getNewDataByAccountIdAndDate(allocation.getAccountId(), statDate);
-                } else if (newType.equals("creative")) {
+                } else if ("creative".equals(newType)) {
                     count = creativeService.getNewDataByAccountIdAndDate(allocation.getAccountId(), statDate);
                 }
                 addNewly.setNewCount(count);

+ 3 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/EtlKuaishouReportAccountHourlyServiceImpl.java

@@ -85,7 +85,7 @@ public class EtlKuaishouReportAccountHourlyServiceImpl extends ServiceImpl<EtlKu
         List<EtlKuaishouReportAccountHourly> list = etlDailyAccountMapper.selectList(lastStartDate, lastStartDate);
         if (!Check.isNull(list)) {
             for (EtlKuaishouReportAccountHourly accountHourly : list) {
-                accountHourly.setStatHour(23l);
+                accountHourly.setStatHour(23L);
             }
             etlHourlyAccountMapper.replaceBatch(list);
         }
@@ -163,7 +163,7 @@ public class EtlKuaishouReportAccountHourlyServiceImpl extends ServiceImpl<EtlKu
             completionTime(todayList);
             completionTime(yesterdayList);
         } else {
-            if (value.equals("play_3s_ratio")) {
+            if ("play_3s_ratio".equals(value)) {
                 value = request.getString("value");
                 type = "more";
             }
@@ -450,7 +450,7 @@ public class EtlKuaishouReportAccountHourlyServiceImpl extends ServiceImpl<EtlKu
             updateTime = etlHourlyAccountMapper.getNewlyUpdateTime();
         } else {
             updateTime = etlDailyAccountMapper.getNewlyUpdateTime();
-            if (parameterCode.equals("campaign") || parameterCode.equals("unit")) {
+            if ("campaign".equals(parameterCode) || "unit".equals(parameterCode)) {
                 data = etlDailyAccountMapper.queryEveryDayCount(request);
             } else {
                 data = etlDailyAccountMapper.queryEveryDayCharge(request);

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouProjectVideoEtlInfoServiceImpl.java

@@ -19,7 +19,7 @@ public class KuaishouProjectVideoEtlInfoServiceImpl extends ServiceImpl<Kuaishou
     @Override
     public KuaishouProjectVideoEtlInfo getByProjectVideoEtlInfoByParams(String signature, Long projectId) {
         QueryWrapper<KuaishouProjectVideoEtlInfo>queryWrapper = new QueryWrapper<>();
-        if(null!=signature&&!signature.trim().equals("")){
+        if(null!=signature&&!"".equals(signature.trim())){
             queryWrapper.eq("video_code",signature);
         }
         if(null!=projectId&&projectId!=0){

+ 15 - 15
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouVideoEtlInfoServiceImpl.java

@@ -55,7 +55,7 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
             materials.forEach(material -> {
                 executorService.submit(() -> {
                     try {
-                        if (null == material.getSignature() || material.getSignature().trim().equals("")) {
+                        if (null == material.getSignature() || "".equals(material.getSignature().trim())) {
                             return;
                         }
 
@@ -72,33 +72,33 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                             String clipId = null;
                             if (null != ascription) {
                                 String planId = ascription.getString("planId");
-                                if (null != planId && !planId.trim().equals("")) {
+                                if (null != planId && !"".equals(planId.trim())) {
                                     etlInfo.setPlanId(planId);
                                 }
                                 String planName = ascription.getString("planName");
-                                if (null != planName && !planName.trim().equals("")) {
+                                if (null != planName && !"".equals(planName.trim())) {
                                     etlInfo.setPlanName(planName);
                                 }
                                 clipId = ascription.getString("clipId");
-                                if (null != clipId && !clipId.trim().equals("")) {
+                                if (null != clipId && !"".equals(clipId.trim())) {
                                     etlInfo.setClipId(clipId);
                                 }
                                 String clipName = ascription.getString("clipName");
-                                if (null != clipName && !clipName.trim().equals("")) {
+                                if (null != clipName && !"".equals(clipName.trim())) {
                                     etlInfo.setClipName(clipName);
                                 }
                                 String shotId = ascription.getString("shotId");
-                                if (null != shotId && !shotId.trim().equals("")) {
+                                if (null != shotId && !"".equals(shotId.trim())) {
                                     etlInfo.setShotId(shotId);
                                 }
                                 String shotName = ascription.getString("shotName");
-                                if (null != shotName && !shotName.trim().equals("")) {
+                                if (null != shotName && !"".equals(shotName.trim())) {
                                     etlInfo.setShotName(shotName);
                                 }
                             }
                             if (null != clipId) {
                                 String companyName = kuaishouVideoEtlInfoMapper.getCompanyNameByUserId(clipId);
-                                if (null != companyName && !companyName.trim().equals("")) {
+                                if (null != companyName && !"".equals(companyName.trim())) {
                                     etlInfo.setCompanyName(companyName);
                                 }
                             }
@@ -131,33 +131,33 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                             String clipId = null;
                             if (null != ascription) {
                                 String planId = ascription.getString("planId");
-                                if (null != planId && !planId.trim().equals("")) {
+                                if (null != planId && !"".equals(planId.trim())) {
                                     etlInfo.setPlanId(planId);
                                 }
                                 String planName = ascription.getString("planName");
-                                if (null != planName && !planName.trim().equals("")) {
+                                if (null != planName && !"".equals(planName.trim())) {
                                     etlInfo.setPlanName(planName);
                                 }
                                 clipId = ascription.getString("clipId");
-                                if (null != clipId && !clipId.trim().equals("")) {
+                                if (null != clipId && !"".equals(clipId.trim())) {
                                     etlInfo.setClipId(clipId);
                                 }
                                 String clipName = ascription.getString("clipName");
-                                if (null != clipName && !clipName.trim().equals("")) {
+                                if (null != clipName && !"".equals(clipName.trim())) {
                                     etlInfo.setClipName(clipName);
                                 }
                                 String shotId = ascription.getString("shotId");
-                                if (null != shotId && !shotId.trim().equals("")) {
+                                if (null != shotId && !"".equals(shotId.trim())) {
                                     etlInfo.setShotId(shotId);
                                 }
                                 String shotName = ascription.getString("shotName");
-                                if (null != shotName && !shotName.trim().equals("")) {
+                                if (null != shotName && !"".equals(shotName.trim())) {
                                     etlInfo.setShotName(shotName);
                                 }
                             }
                             if (null != clipId) {
                                 String companyName = kuaishouVideoEtlInfoMapper.getCompanyNameByUserId(clipId);
-                                if (null != companyName && !companyName.trim().equals("")) {
+                                if (null != companyName && !"".equals(companyName.trim())) {
                                     etlInfo.setCompanyName(companyName);
                                 }
                             }

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/oa/modules/service/impl/AppchatCreateServiceImpl.java

@@ -88,7 +88,7 @@ public class AppchatCreateServiceImpl implements IAppchatCreateService {
             if (Check.isNull(userInfo)) {
                 continue;
             }
-            if (userInfo.getWexinName().equals("于蒙蒙") || userInfo.getWexinName().equals("吴永前")) {
+            if ("于蒙蒙".equals(userInfo.getWexinName()) || "吴永前".equals(userInfo.getWexinName())) {
                 continue;
             }
             text.append("@" + userInfo.getWexinName() + "");

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/shiwan/modules/controller/ShiwanFileUploadController.java

@@ -121,7 +121,7 @@ public class ShiwanFileUploadController {
                 result.success("查询成功!");
                 result.setResult(list);
             } else {
-                result.error(-1, "查询失败");
+                Result.error(-1, "查询失败");
             }
         }
         return result;

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceNewPlanReportCtrl.java

@@ -36,7 +36,7 @@ public class BytedanceNewPlanReportCtrl {
         JSONArray accountIds = requestBody.getJSONArray("accountIds");
         //TODO 没有维护头条事业部负责人角色,增加判断
         String userId = requestBody.getString("userId");
-        if (userId.equals("0c2113fb63b94941be024efce2d83369")) {
+        if ("0c2113fb63b94941be024efce2d83369".equals(userId)) {
             accountIds = newPlanReportService.getAccountIdsByMedia();
         } else {
             if (!userId.isEmpty()) {

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceVideoReportMapper.xml

@@ -16,7 +16,7 @@
         t1.material_name AS materialName,
         t1.project_name AS projectName,
         t1.material_create_time AS createTime,
-        sum (t1.material_show) as showMaterial,
+        sum(t1.material_show) as showMaterial,
         ${filed}
         FROM
         etl_report_bytedance_video t1

+ 30 - 30
jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceVideoEtlInfoServiceImpl.java

@@ -48,7 +48,7 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
             materials.forEach(material->{
                 executorService.submit(()->{
                     try {
-                        if(null == material.getVideoCode()||material.getVideoCode().trim().equals("")){
+                        if(null == material.getVideoCode()|| "".equals(material.getVideoCode().trim())){
                             return;
                         }
                         String signature = material.getVideoCode();
@@ -64,33 +64,33 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
                             String planId = null;
                             if(null!=ascription){
                                 planId = ascription.getString("planId");
-                                if(null!=planId&&!planId.trim().equals("")){
+                                if(null!=planId&&!"".equals(planId.trim())){
                                     etlInfo.setPlanId(planId);
                                 }
                                 String planName =  ascription.getString("planName");
-                                if(null!=planName&&!planName.trim().equals("")){
+                                if(null!=planName&&!"".equals(planName.trim())){
                                     etlInfo.setPlanName(planName);
                                 }
                                 String clipId = ascription.getString("clipId");
-                                if(null!=clipId&&!clipId.trim().equals("")){
+                                if(null!=clipId&&!"".equals(clipId.trim())){
                                     etlInfo.setClipId(clipId);
                                 }
                                 String clipName = ascription.getString("clipName");
-                                if(null!=clipName&&!clipName.trim().equals("")){
+                                if(null!=clipName&&!"".equals(clipName.trim())){
                                     etlInfo.setClipName(clipName);
                                 }
                                 String shotId = ascription.getString("shotId");
-                                if(null!=shotId&&!shotId.trim().equals("")){
+                                if(null!=shotId&&!"".equals(shotId.trim())){
                                     etlInfo.setShotId(shotId);
                                 }
                                 String shotName = ascription.getString("shotName");
-                                if(null!=shotName&&!shotName.trim().equals("")){
+                                if(null!=shotName&&!"".equals(shotName.trim())){
                                     etlInfo.setShotName(shotName);
                                 }
                             }
                             if(null!=planId){
                                 String companyName = userAllocationMapper.getCompanyNameByUserId(planId);
-                                if (null!=companyName&&!companyName.trim().equals("")){
+                                if (null!=companyName&&!"".equals(companyName.trim())){
                                     etlInfo.setCompanyName(companyName);
                                 }
                             }
@@ -123,33 +123,33 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
                             String planId = null;
                             if(null!=ascription){
                                 planId = ascription.getString("planId");
-                                if(null!=planId&&!planId.trim().equals("")){
+                                if(null!=planId&&!"".equals(planId.trim())){
                                     etlInfo.setPlanId(planId);
                                 }
                                 String planName =  ascription.getString("planName");
-                                if(null!=planName&&!planName.trim().equals("")){
+                                if(null!=planName&&!"".equals(planName.trim())){
                                     etlInfo.setPlanName(planName);
                                 }
                                 String clipId = ascription.getString("clipId");
-                                if(null!=clipId&&!clipId.trim().equals("")){
+                                if(null!=clipId&&!"".equals(clipId.trim())){
                                     etlInfo.setClipId(clipId);
                                 }
                                 String clipName = ascription.getString("clipName");
-                                if(null!=clipName&&!clipName.trim().equals("")){
+                                if(null!=clipName&&!"".equals(clipName.trim())){
                                     etlInfo.setClipName(clipName);
                                 }
                                 String shotId = ascription.getString("shotId");
-                                if(null!=shotId&&!shotId.trim().equals("")){
+                                if(null!=shotId&&!"".equals(shotId.trim())){
                                     etlInfo.setShotId(shotId);
                                 }
                                 String shotName = ascription.getString("shotName");
-                                if(null!=shotName&&!shotName.trim().equals("")){
+                                if(null!=shotName&&!"".equals(shotName.trim())){
                                     etlInfo.setShotName(shotName);
                                 }
                             }
                             if(null!=planId){
                                 String companyName = userAllocationMapper.getCompanyNameByUserId(planId);
-                                if (null!=companyName&&!companyName.trim().equals("")){
+                                if (null!=companyName&&!"".equals(companyName.trim())){
                                     etlInfo.setCompanyName(companyName);
                                 }
                             }
@@ -220,7 +220,7 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
             materials.forEach(material->{
                 executorService.submit(()->{
                     try {
-                        if(null == material.getVideoCode()||material.getVideoCode().trim().equals("")){
+                        if(null == material.getVideoCode()|| "".equals(material.getVideoCode().trim())){
                             return;
                         }
                         String signature = material.getVideoCode();
@@ -236,33 +236,33 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
                             String planId = null;
                             if(null!=ascription){
                                 planId = ascription.getString("planId");
-                                if(null!=planId&&!planId.trim().equals("")){
+                                if(null!=planId&&!"".equals(planId.trim())){
                                     etlInfo.setPlanId(planId);
                                 }
                                 String planName =  ascription.getString("planName");
-                                if(null!=planName&&!planName.trim().equals("")){
+                                if(null!=planName&&!"".equals(planName.trim())){
                                     etlInfo.setPlanName(planName);
                                 }
                                 String clipId = ascription.getString("clipId");
-                                if(null!=clipId&&!clipId.trim().equals("")){
+                                if(null!=clipId&&!"".equals(clipId.trim())){
                                     etlInfo.setClipId(clipId);
                                 }
                                 String clipName = ascription.getString("clipName");
-                                if(null!=clipName&&!clipName.trim().equals("")){
+                                if(null!=clipName&&!"".equals(clipName.trim())){
                                     etlInfo.setClipName(clipName);
                                 }
                                 String shotId = ascription.getString("shotId");
-                                if(null!=shotId&&!shotId.trim().equals("")){
+                                if(null!=shotId&&!"".equals(shotId.trim())){
                                     etlInfo.setShotId(shotId);
                                 }
                                 String shotName = ascription.getString("shotName");
-                                if(null!=shotName&&!shotName.trim().equals("")){
+                                if(null!=shotName&&!"".equals(shotName.trim())){
                                     etlInfo.setShotName(shotName);
                                 }
                             }
                             if(null!=planId){
                                 String companyName = userAllocationMapper.getCompanyNameByUserId(planId);
-                                if (null!=companyName&&!companyName.trim().equals("")){
+                                if (null!=companyName&&!"".equals(companyName.trim())){
                                     etlInfo.setCompanyName(companyName);
                                 }
                             }
@@ -295,33 +295,33 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
                             String planId = null;
                             if(null!=ascription){
                                 planId = ascription.getString("planId");
-                                if(null!=planId&&!planId.trim().equals("")){
+                                if(null!=planId&&!"".equals(planId.trim())){
                                     etlInfo.setPlanId(planId);
                                 }
                                 String planName =  ascription.getString("planName");
-                                if(null!=planName&&!planName.trim().equals("")){
+                                if(null!=planName&&!"".equals(planName.trim())){
                                     etlInfo.setPlanName(planName);
                                 }
                                 String clipId = ascription.getString("clipId");
-                                if(null!=clipId&&!clipId.trim().equals("")){
+                                if(null!=clipId&&!"".equals(clipId.trim())){
                                     etlInfo.setClipId(clipId);
                                 }
                                 String clipName = ascription.getString("clipName");
-                                if(null!=clipName&&!clipName.trim().equals("")){
+                                if(null!=clipName&&!"".equals(clipName.trim())){
                                     etlInfo.setClipName(clipName);
                                 }
                                 String shotId = ascription.getString("shotId");
-                                if(null!=shotId&&!shotId.trim().equals("")){
+                                if(null!=shotId&&!"".equals(shotId.trim())){
                                     etlInfo.setShotId(shotId);
                                 }
                                 String shotName = ascription.getString("shotName");
-                                if(null!=shotName&&!shotName.trim().equals("")){
+                                if(null!=shotName&&!"".equals(shotName.trim())){
                                     etlInfo.setShotName(shotName);
                                 }
                             }
                             if(null!=planId){
                                 String companyName = userAllocationMapper.getCompanyNameByUserId(planId);
-                                if (null!=companyName&&!companyName.trim().equals("")){
+                                if (null!=companyName&&!"".equals(companyName.trim())){
                                     etlInfo.setCompanyName(companyName);
                                 }
                             }

+ 10 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceVideoReportServiceImpl.java

@@ -33,7 +33,17 @@ public class BytedanceVideoReportServiceImpl implements IBytedanceVideoReportSer
 
     @Override
     public PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan,String leader, int pageSize, int pageNo) {
+        System.out.println("#################################################");
+        System.out.println("startDate:"+startDate);
+        System.out.println("endDate:"+endDate);
+        System.out.println("accountIds:"+accountIds);
         System.out.println("filed:"+filed);
+        System.out.println("target:"+target);
+        System.out.println("order:"+order);
+        System.out.println("accountIds:"+accountIds);
+        System.out.println("accountIds:"+accountIds);
+        System.out.println("accountIds:"+accountIds);
+        System.out.println("#################################################");
         PageHelper.startPage(pageNo,pageSize);
         List<JSONObject> jsonObjectList=bytedanceVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order,clip,shot,plan,leader);
         return new PageInfo<>(jsonObjectList);

+ 4 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java

@@ -195,12 +195,12 @@ public class ReportServiceImpl implements IReportService {
             if(null!=plan){
                 String status = plan.getToutiaoStatus();
                 String optStatus = plan.getOptStatus();
-                if(null == optStatus||optStatus.equals("AD_STATUS_DISABLE")||optStatus.trim().equals("")){
+                if(null == optStatus|| "AD_STATUS_DISABLE".equals(optStatus)|| "".equals(optStatus.trim())){
                     continue;
                 }
-                if(null == status||status.trim().equals("")||status.equals("AD_STATUS_DISABLE")
-                        ||status.equals("AD_STATUS_DONE")||status.equals("AD_STATUS_AUDIT_DENY")||status.equals("AD_STATUS_BALANCE_EXCEED")
-                        ||status.equals("AD_STATUS_CAMPAIGN_DISABLE")||status.equals("AD_STATUS_CAMPAIGN_EXCEED")||status.equals("AD_STATUS_DELETE")){
+                if(null == status|| "".equals(status.trim())|| "AD_STATUS_DISABLE".equals(status)
+                        || "AD_STATUS_DONE".equals(status)|| "AD_STATUS_AUDIT_DENY".equals(status)|| "AD_STATUS_BALANCE_EXCEED".equals(status)
+                        || "AD_STATUS_CAMPAIGN_DISABLE".equals(status)|| "AD_STATUS_CAMPAIGN_EXCEED".equals(status)|| "AD_STATUS_DELETE".equals(status)){
                     continue;
                 }
                 ruleDataPlan.setBudget(plan.getBudget());

+ 1 - 1
jeecg-boot-module-system/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java

@@ -162,7 +162,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
 
     @Override
     public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
-        this.applicationContext = applicationContext;
+        XxlJobSpringExecutor.applicationContext = applicationContext;
     }
 
     public static ApplicationContext getApplicationContext() {

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ads/controller/AiKuaiShouReportAnalyzeCtrl.java

@@ -39,10 +39,10 @@ public class AiKuaiShouReportAnalyzeCtrl {
         if(params.isEmpty()){
             result.error500("参数为空");
         }else {
-            if(params.getString("type").equals("target")){
+            if("target".equals(params.getString("type"))){
                 result.setResult(aiKuaiShouReportAnalyzeService.getTargetReportBy(params));
             }
-            else if(params.getString("type").equals("material")){
+            else if("material".equals(params.getString("type"))){
                 result.setResult(aiKuaiShouReportAnalyzeService.getMaterialReportBy(params));
             }
             result.setSuccess(true);
@@ -57,10 +57,10 @@ public class AiKuaiShouReportAnalyzeCtrl {
         if(params.isEmpty()){
             result.error500("参数为空");
         }else {
-            if(params.getString("type").equals("target")){
+            if("target".equals(params.getString("type"))){
                 result.setResult(aiKuaiShouReportAnalyzeService.getTargetChartBy(params));
             }
-            else if(params.getString("type").equals("material")){
+            else if("material".equals(params.getString("type"))){
                 result.setResult(aiKuaiShouReportAnalyzeService.getMaterialChartBy(params));
             }
             result.setSuccess(true);

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

@@ -94,13 +94,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;
@@ -109,6 +111,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);
@@ -145,19 +148,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);

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

@@ -65,8 +65,8 @@ public class BytedanceVideoEtlInfoController {
 		String endDate = bytedanceVideoEtlInfo.getEndDate();
 		bytedanceVideoEtlInfo.setEndDate(null);
 		QueryWrapper<BytedanceVideoEtlInfo> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceVideoEtlInfo, req.getParameterMap());
-		if(null!=type&&!type.equals("")){
-			if(type.trim().equals("valid")){
+		if(null!=type&&!"".equals(type)){
+			if("valid".equals(type.trim())){
 				//有效
 				if(null!=startDate&&!"".equals(startDate.trim())){
 					queryWrapper.ge("effect_date",startDate);
@@ -75,7 +75,7 @@ public class BytedanceVideoEtlInfoController {
 					queryWrapper.le("effect_date",endDate);
 				}
 				queryWrapper.le("effect_day_num",7);
-			}else if(type.trim().equals("hot")){
+			}else if("hot".equals(type.trim())){
 				//爆款
 				if(null!=startDate&&!"".equals(startDate.trim())){
 					queryWrapper.ge("faddish_date",startDate);
@@ -177,8 +177,8 @@ public class BytedanceVideoEtlInfoController {
 		String endDate = bytedanceVideoEtlInfo.getEndDate();
 		bytedanceVideoEtlInfo.setEndDate(null);
 		QueryWrapper<BytedanceVideoEtlInfo> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceVideoEtlInfo, request.getParameterMap());
-		if(null!=type&&!type.equals("")){
-			if(type.trim().equals("valid")){
+		if(null!=type&&!"".equals(type)){
+			if("valid".equals(type.trim())){
 				//有效
 				if(null!=startDate&&!"".equals(startDate.trim())){
 					queryWrapper.ge("effect_date",startDate);
@@ -187,7 +187,7 @@ public class BytedanceVideoEtlInfoController {
 					queryWrapper.le("effect_date",endDate);
 				}
 				queryWrapper.le("effect_day_num",7);
-			}else if(type.trim().equals("hot")){
+			}else if("hot".equals(type.trim())){
 				//爆款
 				if(null!=startDate&&!"".equals(startDate.trim())){
 					queryWrapper.ge("faddish_date",startDate);

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

@@ -203,7 +203,7 @@ public class CallbackController {
                     userAllocation.setSystemType(systemType);
                     // 获取快手昵称
                     userAllocation.setAuthName((String) advertiseBaseInfoMap.get("userName"));
-                    if (null != authBeginTime && !authBeginTime.trim().equals("")) {
+                    if (null != authBeginTime && !"".equals(authBeginTime.trim())) {
                         userAllocation.setAuthBeginTime(authBeginTime);
                     }
                     userAllocation.setMediaId(mediaId);
@@ -385,7 +385,7 @@ public class CallbackController {
                             userAllocation.setProjectId(projectId);
                             userAllocation.setSystemType(systemType);
                             userAllocation.setAuthName((String) advertiserDataMap.get("name"));
-                            if (null != authBeginTime && !authBeginTime.trim().equals("")) {
+                            if (null != authBeginTime && !"".equals(authBeginTime.trim())) {
                                 userAllocation.setAuthBeginTime(authBeginTime);
                             }
                             userAllocation.setAdvertiserId(advertiserId);
@@ -440,7 +440,7 @@ public class CallbackController {
                     userAllocation.setProjectId(projectId);
                     userAllocation.setSystemType(systemType);
                     userAllocation.setAuthName((String) advertiserDataMap.get("name"));
-                    if (null != authBeginTime && !authBeginTime.trim().equals("")) {
+                    if (null != authBeginTime && !"".equals(authBeginTime.trim())) {
                         userAllocation.setAuthBeginTime(authBeginTime);
                     }
                     userAllocation.setAdvertiserId(advertiserId);

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

@@ -62,8 +62,8 @@ public class KuaishouVideoEtlInfoController {
        String endDate = kuaishouVideoEtlInfo.getEndDate();
        kuaishouVideoEtlInfo.setEndDate(null);
        QueryWrapper<KuaishouVideoEtlInfo> queryWrapper = QueryGenerator.initQueryWrapper(kuaishouVideoEtlInfo, req.getParameterMap());
-       if(null!=type&&!type.equals("")){
-           if(type.trim().equals("valid")){
+       if(null!=type&&!"".equals(type)){
+           if("valid".equals(type.trim())){
                //有效
                if(null!=startDate&&!"".equals(startDate.trim())){
                    queryWrapper.ge("effect_date",startDate);
@@ -72,7 +72,7 @@ public class KuaishouVideoEtlInfoController {
                    queryWrapper.le("effect_date",endDate);
                }
                queryWrapper.lt("effect_day_num",7);
-           }else if(type.trim().equals("hot")){
+           }else if("hot".equals(type.trim())){
                //爆款
                if(null!=startDate&&!"".equals(startDate.trim())){
                    queryWrapper.ge("faddish_date",startDate);
@@ -185,8 +185,8 @@ public class KuaishouVideoEtlInfoController {
      String endDate = kuaishouVideoEtlInfo.getEndDate();
      kuaishouVideoEtlInfo.setEndDate(null);
      QueryWrapper<KuaishouVideoEtlInfo> queryWrapper = QueryGenerator.initQueryWrapper(kuaishouVideoEtlInfo, request.getParameterMap());
-     if(null!=type&&!type.equals("")){
-         if(type.trim().equals("valid")){
+     if(null!=type&&!"".equals(type)){
+         if("valid".equals(type.trim())){
              //有效
              if(null!=startDate&&!"".equals(startDate.trim())){
                  queryWrapper.ge("effect_date",startDate);
@@ -195,7 +195,7 @@ public class KuaishouVideoEtlInfoController {
                  queryWrapper.le("effect_date",endDate);
              }
              queryWrapper.lt("effect_day_num",7);
-         }else if(type.trim().equals("hot")){
+         }else if("hot".equals(type.trim())){
              //爆款
              if(null!=startDate&&!"".equals(startDate.trim())){
                  queryWrapper.ge("faddish_date",startDate);

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

@@ -782,6 +782,7 @@ public class MaterialInfoController {
         if (materialInfoEntity == null) {
             return result.error500("未找到对应实体");
         }
+        //TODO 驳回重新上传素材时需要清空素材的水印信息数据
         String url = materialInfo.getUrl();
         if (!Check.isNull(url)) {
             if (!url.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {

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

@@ -90,18 +90,60 @@ public class ProjectMemberController {
      * @param userId
      * @return
      */
+    @Autowired
+    private IProductService productService;
+
     @GetMapping(value = "/participateList")
     public Map<String, Object> participateList(String userId) {
         Map<String, Object> map = new HashMap<>();
         try {
+            QueryWrapper<ProjectMember> queryWrapper = new QueryWrapper<>();
             String roleCode = sysRoleService.getRoleCodeByUserId(userId);
             if (!"admin".equals(roleCode) && !roleCode.contains("sale") && !"meidaManager".equals(roleCode)) {
-                userId = null;
+                queryWrapper.eq("user_id", userId);
+            }
+            queryWrapper.groupBy("project_id");
+            queryWrapper.orderByDesc("create_time");
+            List<ProjectMember> projectMembers = projectMemberMapper.selectList(queryWrapper);
+            List<ProjectMember> projectMemberList = new ArrayList<>();
+            if (!Check.isNull(projectMembers)) {
+                for (ProjectMember projectMember : projectMembers) {
+                    if (Check.isNull(projectMember)) {
+                        continue;
+                    }
+                    Project project = projectService.getById(projectMember.getProjectId());
+                    if (!Check.isNull(project)) {
+                        SysUser responsible = sysUserService.getById(project.getResponsibleId());
+
+                        if (!Check.isNull(responsible)) {
+                            projectMember.setResponsibleName(responsible.getRealname());
+                        }
+
+                        SysUser designResponsible = sysUserService.getById(project.getDesignResponsibleId());
+                        if (!Check.isNull(designResponsible)) {
+                            projectMember.setDesignResponsibleName(designResponsible.getRealname());
+                        }
+
+                        projectMember.setProjectName(project.getProjectName());
+                        Product product = productService.getById(project.getProductId());
+                        if (!Check.isNull(product)) {
+                            projectMember.setProductId(product.getId());
+                            projectMember.setProductName(product.getProductName());
+                        }
+                        Advertiser advertiser = advertiserService.getById(project.getAdvertiserId());
+                        if (!Check.isNull(advertiser)) {
+                            projectMember.setAdvertiserName(advertiser.getName());
+                        }
+                        projectMember.setAdvertiserId(project.getAdvertiserId());
+                        projectMember.setMediaId(project.getMediaId());
+                        projectMember.setMaxBid(project.getMaxBid());
+                        projectMemberList.add(projectMember);
+                    }
+                }
             }
-            List <ProjectMember> projectMembers = projectMemberMapper.getlistByUserId(userId);
             map.put("code", 0);
             map.put("success", true);
-            map.put("result", projectMembers);
+            map.put("result", projectMemberList);
         } catch (Exception e) {
             e.printStackTrace();
             map.put("success", false);
@@ -281,7 +323,7 @@ public class ProjectMemberController {
                 throw new Exception("请选择项目");
             }
             Project project = projectService.getById(projectId);
-            if(Check.isNull(project)){
+            if (Check.isNull(project)) {
                 throw new Exception("项目不存在");
             }
             JSONArray memberArr = jsonObject.getJSONArray("memberArr");

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

@@ -674,7 +674,7 @@ public class TestController {
     public Map<String, Object> getKuaishouPlanHourlyReport(String params) {
         Long start = System.currentTimeMillis();
         Map<String, Object> result = new HashMap<>();
-        if (null == params || params.trim().equals("")) {
+        if (null == params || "".equals(params.trim())) {
             ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
             result.put("message", "COMMON_PARAM_ERROR");
             return result;

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

@@ -195,7 +195,7 @@ public class UserAllocationController {
         projectMemberService.getOwnProjects(mediaList);
         List<ProjectMember> projectMemberList = new ArrayList<>();
         for (ProjectMember projectMember : projectList) {
-            if (projectMember.getProductId() != productId) {
+            if (!projectMember.getProductId().equals(productId)) {
                 continue;
             }
             List<UserAllocation> userAllocationList = userAllocationService.getAccountListByUserIdAndProductId(userId, projectMember.getProjectId(), productId);

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/MaterialReportOverViewServiceImpl.java

@@ -488,7 +488,7 @@ public class MaterialReportOverViewServiceImpl implements IMaterialReportOverVie
         //String currentUser = "e9ca23d68d884d4ebb19d07889727dae";
         //TODO 为了解决管理员等角色初始化查全部项目查询效率慢的问题判断角色,待优化
         String roleCode = roleService.getRoleCodeByUserId(currentUser);
-        if (roleCode.equals("admin")) {
+        if ("admin".equals(roleCode)) {
             return null;
         }
         return Check.isNull(queryProjectIdBy(recursiveQuerySubordinate(currentUser), mediaId)) ? null : queryProjectIdBy(recursiveQuerySubordinate(currentUser), mediaId);

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/orderplatform/service/impl/PlatformMaterialServiceImpl.java

@@ -68,7 +68,7 @@ public class PlatformMaterialServiceImpl extends ServiceImpl<PlatformMaterialMap
     public List<JSONObject> queryMaterialsByDesignUserId(String materialStatus, String designUserId) {
         JSONArray materialStatusJsonArray = JsonArrayUtil.Varchar2JSONArray(materialStatus);
         List<JSONObject> result = new ArrayList<>();
-        if (materialStatus.equals("0")) {
+        if ("0".equals(materialStatus)) {
             result = platformMaterialMapper.queryMaterialsByDesignLeader(materialStatusJsonArray, designUserId);
         } else {
             result = platformMaterialMapper.queryMaterialsByDesignUserId(materialStatusJsonArray, designUserId);

+ 81 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java

@@ -1,13 +1,23 @@
 package org.jeecg.modules.system.controller;
 
-import cn.com.ctop.common.module.service.ISysDepartService;
-import cn.com.ctop.common.module.service.ISysDictService;
-import cn.com.ctop.common.module.service.ISysUserService;
+import cn.com.ctop.common.module.entity.CtopCorpWexinUser;
+import cn.com.ctop.common.module.entity.WexinConfig;
+import cn.com.ctop.common.module.service.*;
+import cn.com.ctop.common.module.utils.Check;
 import cn.hutool.core.util.RandomUtil;
 import com.alibaba.fastjson.JSONObject;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
+import lombok.val;
+import me.chanjar.weixin.common.error.WxErrorException;
+import me.chanjar.weixin.cp.api.WxCpOAuth2Service;
+import me.chanjar.weixin.cp.api.WxCpUserService;
+import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl;
+import me.chanjar.weixin.cp.api.impl.WxCpUserServiceImpl;
+import me.chanjar.weixin.cp.bean.WxCpOauth2UserInfo;
+import me.chanjar.weixin.cp.bean.WxCpUser;
+import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CacheConstant;
@@ -91,6 +101,74 @@ public class LoginController {
 		sysBaseApi.addLog("用户名: " + username + ",登录成功!", CommonConstant.LOG_TYPE_1, null);
 		return result;
 	}
+
+	@Autowired
+	private ICtopCorpWexinUserService ctopCorpWexinUserService;
+	@Autowired
+	private IWexinConfigService wexinConfigService;
+
+	@RequestMapping(value = "/wxlogin", method = RequestMethod.POST)
+	@ApiOperation("企业微信登录接口")
+	public Result<JSONObject> wxlogin(@RequestParam(name = "code") String code, @RequestParam(name = "corpId") String corpId) throws Exception {
+		Result<JSONObject> result = new Result<>();
+		WexinConfig wexinConfig = wexinConfigService.getInfoByCorpId(corpId);
+		if (Check.isNull(wexinConfig)) {
+			result.error500("未找到用户配置,请联系管理员");
+			return result;
+		}
+		val configStorage = new WxCpDefaultConfigImpl();
+		configStorage.setCorpId(wexinConfig.getCorpId());
+		configStorage.setAgentId(wexinConfig.getAgentId());
+		configStorage.setCorpSecret(wexinConfig.getCorpSecret());
+		configStorage.setToken(wexinConfig.getToken());
+		configStorage.setAesKey(wexinConfig.getAesKey());
+		val service = new WxCpServiceImpl();
+		service.setWxCpConfigStorage(configStorage);
+		WxCpOAuth2Service wxCpOAuth2Service = service.getOauth2Service();
+		try {
+			WxCpOauth2UserInfo userInfo = wxCpOAuth2Service.getUserInfo(1000002, code);
+			if (userInfo != null && userInfo.getUserId() != null) {
+				WxCpUserService wxCpUserService = new WxCpUserServiceImpl(service);
+				WxCpUser user = wxCpUserService.getById(userInfo.getUserId());
+				String email = user.getEmail();
+				SysUser sysUser = sysUserService.getUserByEmail(email);
+				if (sysUser == null) {
+					result.error500("该用户未注册系统账户,请联系管理员");
+					return result;
+				}
+				if (sysUser.getStatus() != 1) {
+					result.error500("该用户已冻结,请联系管理员");
+					return result;
+				}
+				String departId = sysDepartService.selectIdByOrdCode(sysUser.getOrgCode());
+				sysUser.setDepartId(departId);
+				result = sysUserService.checkUserIsEffective(sysUser);
+				if (!result.isSuccess()) {
+					return result;
+				}
+				//用户登录信息
+				userInfo(sysUser, result);
+				sysBaseApi.addLog("用户名: " + email + ",登录成功!", CommonConstant.LOG_TYPE_1, null);
+				CtopCorpWexinUser ctopCorpWexinUser = ctopCorpWexinUserService.getById(sysUser.getId());
+				if (ctopCorpWexinUser == null) {
+					ctopCorpWexinUser = new CtopCorpWexinUser();
+					ctopCorpWexinUser.setCorpId(corpId);
+					ctopCorpWexinUser.setUserId(sysUser.getId());
+					ctopCorpWexinUser.setWexinEmail(user.getEmail());
+					ctopCorpWexinUser.setWexinGender(user.getGender().getGenderName());
+					ctopCorpWexinUser.setWexinName(user.getName());
+					ctopCorpWexinUser.setWexinId(user.getUserId());
+					ctopCorpWexinUser.setWexinMobile(user.getMobile());
+					ctopCorpWexinUserService.save(ctopCorpWexinUser);
+				}
+				return result;
+			}
+		} catch (WxErrorException e) {
+			result.error500("企业微信授权错误");
+			e.printStackTrace();
+		}
+		return result;
+	}
 	
 	/**
 	 * 退出登录

+ 6 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/CategoryCodeRule.java

@@ -28,11 +28,15 @@ public class CategoryCodeRule implements IFillRuleHandler {
 
         if (formData != null && formData.size() > 0) {
             Object obj = formData.get("pid");
-            if (oConvertUtils.isNotEmpty(obj)) categoryPid = obj.toString();
+            if (oConvertUtils.isNotEmpty(obj)){
+                categoryPid = obj.toString();
+            }
         } else {
             if (params != null) {
                 Object obj = params.get("pid");
-                if (oConvertUtils.isNotEmpty(obj)) categoryPid = obj.toString();
+                if (oConvertUtils.isNotEmpty(obj)){
+                    categoryPid = obj.toString();
+                }
             }
         }
 

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrderNumberRule.java

@@ -20,7 +20,9 @@ public class OrderNumberRule implements IFillRuleHandler {
         //订单前缀默认为CN 如果规则参数不为空,则取自定义前缀
         if (params != null) {
             Object obj = params.get("prefix");
-            if (obj != null) prefix = obj.toString();
+            if (obj != null) {
+                prefix = obj.toString();
+            }
         }
         SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
         int random = RandomUtils.nextInt(90) + 10;

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrgCodeRule.java

@@ -38,7 +38,9 @@ public class OrgCodeRule implements IFillRuleHandler {
         String parentId = null;
         if (formData != null && formData.size() > 0) {
             Object obj = formData.get("parentId");
-            if (obj != null) parentId = obj.toString();
+            if (obj != null) {
+                parentId = obj.toString();
+            }
         } else {
             if (params != null) {
                 Object obj = params.get("parentId");

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wps/controller/WpsFileController.java

@@ -76,7 +76,7 @@ public class WpsFileController {
 		wpsFile.setName(null);
 		Result<IPage<WpsFile>> result = new Result<>();
 		QueryWrapper<WpsFile> queryWrapper = QueryGenerator.initQueryWrapper(wpsFile, req.getParameterMap());
-		if(null!=name&&!name.trim().equals("")){
+		if(null!=name&&!"".equals(name.trim())){
 			queryWrapper.like("name",name);
 		}
 		//只查询题库的文件

+ 17 - 2
jeecg-cloud-module/jeecg-cloud-gateway/src/main/resources/application-test.yml

@@ -1,11 +1,23 @@
 spring:
+  redis:
+    database: 0
+    host: 127.0.0.1
+    password:
+    port: 6379
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
   cloud:
     nacos:
       config:
         password:
         username:
       discovery:
-        server-addr: 172.30.0.7:8848
+        server-addr: 172.30.0.14:8848
         service: jeecg-gateway
         namespace:
     gateway:
@@ -21,12 +33,15 @@ spring:
             allowedHeaders: "*"
       routes:
       - id: jeecg-system
-#        uri: http://localhost:7001
         uri: lb://jeecg-system
+        filters:
+          - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
         predicates:
           - Path=/jeecg-boot/**
       - id: jeecg-bytedance-ad
         uri: lb://jeecg-bytedance-ad
+        filters:
+          - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
         predicates:
           - Path=/bytedance/ad/**
 # hystrix 信号量隔离,3秒后自动超时

+ 10 - 0
jeecg-cloud-module/jeecg-cloud-system-start/pom.xml

@@ -59,6 +59,13 @@
     <build>
         <resources>
             <resource>
+                <directory>../../lib</directory>
+                <targetPath>BOOT-INF/lib/</targetPath>
+                <includes>
+                    <include>**/*.jar</include>
+                </includes>
+            </resource>
+            <resource>
                 <directory>src/main/resources</directory>
                 <!--先排除所有的配置文件-->
                 <excludes>
@@ -79,6 +86,9 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
             </plugin>
         </plugins>
     </build>

+ 7 - 0
jeecg-cloud-module/jeecg-cloud-system-start/src/main/resources/application-dev.yml

@@ -1,3 +1,10 @@
+server:
+  port: 7001
+  servlet:
+    context-path: /jeecg-boot
+    compression:
+      enabled: true
+      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
 dubbo:
   application:
     id: sys-center-dubbo-prodiver

+ 8 - 1
jeecg-cloud-module/jeecg-cloud-system-start/src/main/resources/application-prod.yml

@@ -1,3 +1,10 @@
+server:
+  port: 7001
+  servlet:
+    context-path: /jeecg-boot
+    compression:
+      enabled: true
+      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
 dubbo:
   application:
     id: sys-center-dubbo-prodiver
@@ -69,7 +76,7 @@ spring:
   autoconfigure:
     exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
   datasource:
-    url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=GMT%2B8
+    url: jdbc:mysql://172.30.0.4:3390/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=GMT%2B8
     username: data
     password: hcst@2021
     driver-class-name: com.mysql.jdbc.Driver

+ 13 - 2
jeecg-cloud-module/jeecg-cloud-system-start/src/main/resources/application-test.yml

@@ -1,9 +1,16 @@
+server:
+  port: 8806
+  servlet:
+    context-path: /jeecg-boot
+    compression:
+      enabled: true
+      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
 dubbo:
   application:
     id: sys-center-dubbo-prodiver
     name: sys-center-dubbo-prodiver
   registry:
-    address: nacos://127.0.0.1:8848
+    address: nacos://172.30.0.14:8848
   protocol:
     name: dubbo
     port: 20880
@@ -20,6 +27,11 @@ management:
       exposure:
         include: metrics,httptrace
 spring:
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 172.30.0.14:8848
+        service: jeecg-system
   servlet:
     multipart:
       max-file-size: -1
@@ -111,7 +123,6 @@ spring:
   #redis 配置
   redis:
     database: 0
-    #    host: 172.30.0.17
     host: 127.0.0.1
     password:
     port: 6379

+ 0 - 12
jeecg-cloud-module/jeecg-cloud-system-start/src/main/resources/application.yml

@@ -1,19 +1,7 @@
-server:
-  port: 7001
-  servlet:
-    context-path: /jeecg-boot
-    compression:
-      enabled: true
-      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
 spring:
   application:
     name: jeecg-system
   profiles:
     active: @activatedProperties@
-  cloud:
-    nacos:
-      discovery:
-        server-addr: 127.0.0.1:8848
-        service: jeecg-system
   main:
     allow-bean-definition-overriding: true

+ 1 - 0
jeecg-cloud-module/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/core/alarm/impl/EmailJobAlarm.java

@@ -32,6 +32,7 @@ public class EmailJobAlarm implements JobAlarm {
      *
      * @param jobLog
      */
+    @Override
     public boolean doAlarm(XxlJobInfo info, XxlJobLog jobLog){
         boolean alarmResult = true;
 

+ 11 - 7
jeecg-cloud-module/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/core/cron/CronExpression.java

@@ -363,9 +363,10 @@ public final class CronExpression implements Serializable, Cloneable {
         // the second immediately following it.
         while (difference == 1000) {
             newDate = getTimeAfter(lastDate);
-            if(newDate == null)
+            if(newDate == null){
                 break;
-            
+            }
+
             difference = newDate.getTime() - lastDate.getTime();
             
             if (difference == 1000) {
@@ -532,7 +533,7 @@ public final class CronExpression implements Serializable, Cloneable {
             return i;
         }
         char c = s.charAt(i);
-        if ((c >= 'A') && (c <= 'Z') && (!s.equals("L")) && (!s.equals("LW")) && (!s.matches("^L-[0-9]*[W]?"))) {
+        if ((c >= 'A') && (c <= 'Z') && (!"L".equals(s)) && (!"LW".equals(s)) && (!s.matches("^L-[0-9]*[W]?"))) {
             String sub = s.substring(i, i + 3);
             int sval = -1;
             int eval = -1;
@@ -668,8 +669,9 @@ public final class CronExpression implements Serializable, Cloneable {
                 if(c == '-') {
                     ValueSet vs = getValue(0, s, i+1);
                     lastdayOffset = vs.value;
-                    if(lastdayOffset > 30)
+                    if(lastdayOffset > 30) {
                         throw new ParseException("Offset from last day must be <= 30", i+1);
+                    }
                     i = vs.pos;
                 }                        
                 if(s.length() > i) {
@@ -732,8 +734,9 @@ public final class CronExpression implements Serializable, Cloneable {
 
         if (c == 'L') {
             if (type == DAY_OF_WEEK) {
-                if(val < 1 || val > 7)
+                if(val < 1 || val > 7) {
                     throw new ParseException("Day-of-Week values must be between 1 and 7", -1);
+                }
                 lastdayOfWeek = true;
             } else {
                 throw new ParseException("'L' option is not valid here. (pos=" + i + ")", i);
@@ -750,8 +753,9 @@ public final class CronExpression implements Serializable, Cloneable {
             } else {
                 throw new ParseException("'W' option is not valid here. (pos=" + i + ")", i);
             }
-            if(val > 31)
-                throw new ParseException("The 'W' option does not make sense with values larger than 31 (max number of days in a month)", i); 
+            if(val > 31) {
+                throw new ParseException("The 'W' option does not make sense with values larger than 31 (max number of days in a month)", i);
+            }
             TreeSet<Integer> set = getSet(type);
             set.add(val);
             i++;

jeecg-boot-module-system/src/main/resources/lib/jave-1.0.jar → lib/jave-1.0.jar


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