Jelajahi Sumber

删除sysout输出代码

syh 4 tahun lalu
induk
melakukan
86b1d031fa
26 mengubah file dengan 125 tambahan dan 292 penghapusan
  1. 1 6
      jeecg-boot-base-common/src/main/java/org/jeecg/common/constant/ProvinceCityArea.java
  2. 6 11
      jeecg-boot-base-common/src/main/java/org/jeecg/common/system/util/JwtUtil.java
  3. 0 25
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java
  4. 25 28
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/oConvertUtils.java
  5. 11 23
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/CASServiceUtil.java
  6. 11 48
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/XmlUtils.java
  7. 0 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/RuleEngineServiceImpl.java
  8. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/job/SendMsgJob.java
  9. 2 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/opencv/utils/CornerCheck.java
  10. 1 15
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/opencv/utils/ExtractionVideoKeyFrames.java
  11. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/opencv/utils/VideoProcessing.java
  12. 1 10
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/aspect/UrlMatchEnum.java
  13. 0 13
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java
  14. 2 9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wps/util/upload/oss/WpsOSSUtil.java
  15. 2 1
      jeecg-boot-module-system/src/main/resources/application.yml
  16. 56 2
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  17. 0 9
      module-common/src/main/java/cn/com/ctop/common/module/file/FileTypeJudge.java
  18. 0 17
      module-common/src/main/java/cn/com/ctop/common/module/utils/HttpUtils.java
  19. 2 17
      module-common/src/main/java/cn/com/feishu/provider/SendImage.java
  20. 0 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyAgentServiceImpl.java
  21. 0 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceCampaignServiceImpl.java
  22. 0 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceCreativeServiceImpl.java
  23. 0 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/ByteDanceVideoReportDailyController.java
  24. 5 25
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportDailyAgentServiceImpl.java
  25. 0 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java
  26. 0 21
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/utils/ApkUtils.java

+ 1 - 6
jeecg-boot-base-common/src/main/java/org/jeecg/common/constant/ProvinceCityArea.java

@@ -8,9 +8,8 @@ import org.springframework.stereotype.Component;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Scanner;
-import java.util.Set;
 import java.util.List;
+import java.util.Scanner;
 
 @Component("pca")
 public class ProvinceCityArea {
@@ -53,7 +52,6 @@ public class ProvinceCityArea {
     }
 
     private void initAreaList(){
-        //System.out.println("=====================");
         if(this.areaList==null || this.areaList.size()==0){
             this.areaList = new ArrayList<Area>();
             try {
@@ -63,20 +61,17 @@ public class ProvinceCityArea {
                 //第一层 省
                 JSONObject provinceJson = baseJson.getJSONObject("86");
                 for(String provinceKey: provinceJson.keySet()){
-                    //System.out.println("===="+provinceKey);
                     Area province = new Area(provinceKey,provinceJson.getString(provinceKey),"86");
                     this.areaList.add(province);
                     //第二层 市
                     JSONObject cityJson = baseJson.getJSONObject(provinceKey);
                     for(String cityKey:cityJson.keySet()){
-                        //System.out.println("-----"+cityKey);
                         Area city = new Area(cityKey,cityJson.getString(cityKey),provinceKey);
                         this.areaList.add(city);
                         //第三层 区
                         JSONObject areaJson =  baseJson.getJSONObject(cityKey);
                         if(areaJson!=null){
                             for(String areaKey:areaJson.keySet()){
-                                //System.out.println("········"+areaKey);
                                 Area area = new Area(areaKey,areaJson.getString(areaKey),cityKey);
                                 this.areaList.add(area);
                             }

+ 6 - 11
jeecg-boot-base-common/src/main/java/org/jeecg/common/system/util/JwtUtil.java

@@ -81,7 +81,7 @@ public class JwtUtil {
 
 	/**
 	 * 根据request中的token获取用户账号
-	 * 
+	 *
 	 * @param request
 	 * @return
 	 * @throws JeecgBootException
@@ -94,7 +94,7 @@ public class JwtUtil {
 		}
 		return username;
 	}
-	
+
 	/**
 	  *  从session中获取变量
 	 * @param key
@@ -119,7 +119,7 @@ public class JwtUtil {
 		if(returnValue!=null){returnValue = returnValue + moshi;}
 		return returnValue;
 	}
-	
+
 	/**
 	  * 从当前用户中获取变量
 	 * @param key
@@ -132,10 +132,10 @@ public class JwtUtil {
 			user = JeecgDataAutorUtils.loadUserInfo();
 		}
 		//#{sys_user_code}%
-		
+
 		// 获取登录用户信息
 		LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-		
+
 		String moshi = "";
 		if(key.indexOf("}")!=-1){
 			 moshi = key.substring(key.indexOf("}")+1);
@@ -163,7 +163,7 @@ public class JwtUtil {
 				returnValue = user.getSysUserName();
 			}
 		}
-		
+
 		//替换为系统用户登录所使用的机构编码
 		else if (key.equals(DataBaseConstant.SYS_ORG_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_ORG_CODE_TABLE)) {
 			if(user==null) {
@@ -195,9 +195,4 @@ public class JwtUtil {
 		if(returnValue!=null){returnValue = returnValue + moshi;}
 		return returnValue;
 	}
-	
-	public static void main(String[] args) {
-		 String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NjUzMzY1MTMsInVzZXJuYW1lIjoiYWRtaW4ifQ.xjhud_tWCNYBOg_aRlMgOdlZoWFFKB_givNElHNw3X0";
-		 System.out.println(JwtUtil.getUsername(token));
-	}
 }

+ 0 - 25
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java

@@ -63,13 +63,10 @@ public class AesEncryptUtil {
     public static String desEncrypt(String data, String key, String iv) throws Exception {
         try {
 			byte[] encrypted1 = Base64.decode(data);
-
             Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
             SecretKeySpec keyspec = new SecretKeySpec(key.getBytes(), "AES");
             IvParameterSpec ivspec = new IvParameterSpec(iv.getBytes());
-
             cipher.init(Cipher.DECRYPT_MODE, keyspec, ivspec);
-
             byte[] original = cipher.doFinal(encrypted1);
             String originalString = new String(original);
             return originalString;
@@ -98,26 +95,4 @@ public class AesEncryptUtil {
     public static String desEncrypt(String data) throws Exception {
         return desEncrypt(data, KEY, IV);
     }
-
-
-
-    /**
-     * 测试
-     */
-    public static void main(String args[]) throws Exception {
-
-        String test1 = "sa";
-        String test =new String(test1.getBytes(),"UTF-8");
-        String data = null;
-        String key =  KEY;
-        String iv = IV;
-        // /g2wzfqvMOeazgtsUVbq1kmJawROa6mcRAzwG1/GeJ4=
-        data = encrypt(test, key, iv);
-        System.out.println("数据:"+test);
-        System.out.println("加密:"+data);
-        String jiemi =desEncrypt(data, key, iv).trim();
-        System.out.println("解密:"+jiemi);
-
-
-    }
 }

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

@@ -18,7 +18,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 /**
- * 
+ *
  * @Author  张代浩
  *
  */
@@ -36,7 +36,7 @@ public class oConvertUtils {
 		}
 		return (false);
 	}
-	
+
 	public static boolean isNotEmpty(Object object) {
 		if (object != null && !object.equals("") && !object.equals("null")) {
 			return (true);
@@ -68,9 +68,6 @@ public class oConvertUtils {
 		}
 		try {
 			byte[] b = strIn.getBytes(sourceCode);
-			for (int i = 0; i < b.length; i++) {
-				System.out.print(b[i] + "  ");
-			}
 			strOut = new String(b, targetCode);
 		} catch (Exception e) {
 			e.printStackTrace();
@@ -160,7 +157,7 @@ public class oConvertUtils {
 			return (defval);
 		}
 	}
-	
+
 	public static Integer getInt(Object object) {
 		if (isEmpty(object)) {
 			return null;
@@ -204,7 +201,7 @@ public class oConvertUtils {
 	/*public static String escapeJava(Object s) {
 		return StringEscapeUtils.escapeJava(getString(s));
 	}*/
-	
+
 	public static String getString(Object object) {
 		if (isEmpty(object)) {
 			return "";
@@ -260,7 +257,7 @@ public class oConvertUtils {
 
 	/**
 	 * 判断一个类是否为基本数据类型。
-	 * 
+	 *
 	 * @param clazz
 	 *            要判断的类。
 	 * @return true 表示为基本数据类型。
@@ -323,7 +320,7 @@ public class oConvertUtils {
 
 	/**
 	 * java去除字符串中的空格、回车、换行符、制表符
-	 * 
+	 *
 	 * @param str
 	 * @return
 	 */
@@ -340,7 +337,7 @@ public class oConvertUtils {
 
 	/**
 	 * 判断元素是否在数组内
-	 * 
+	 *
 	 * @param substring
 	 * @param source
 	 * @return
@@ -367,7 +364,7 @@ public class oConvertUtils {
 
 	/**
 	 * SET转换MAP
-	 * 
+	 *
 	 * @param str
 	 * @return
 	 */
@@ -411,12 +408,12 @@ public class oConvertUtils {
 	private static boolean isInner(long userIp, long begin, long end) {
 		return (userIp >= begin) && (userIp <= end);
 	}
-	
+
 	/**
 	 * 将下划线大写方式命名的字符串转换为驼峰式。
 	 * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。</br>
 	 * 例如:hello_world->helloWorld
-	 * 
+	 *
 	 * @param name
 	 *            转换前的下划线大写方式命名的字符串
 	 * @return 转换后的驼峰式命名的字符串
@@ -453,12 +450,12 @@ public class oConvertUtils {
 		}
 		return result.toString();
 	}
-	
+
 	/**
 	 * 将下划线大写方式命名的字符串转换为驼峰式。
 	 * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。</br>
 	 * 例如:hello_world,test_id->helloWorld,testId
-	 * 
+	 *
 	 * @param name
 	 *            转换前的下划线大写方式命名的字符串
 	 * @return 转换后的驼峰式命名的字符串
@@ -476,13 +473,13 @@ public class oConvertUtils {
 		String result = sf.toString();
 		return result.substring(0, result.length() - 1);
 	}
-	
+
 	//update-begin--Author:zhoujf  Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能
 	/**
 	 * 将下划线大写方式命名的字符串转换为驼峰式。(首字母写)
 	 * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。</br>
 	 * 例如:hello_world->HelloWorld
-	 * 
+	 *
 	 * @param name
 	 *            转换前的下划线大写方式命名的字符串
 	 * @return 转换后的驼峰式命名的字符串
@@ -511,7 +508,7 @@ public class oConvertUtils {
 		return result.toString();
 	}
 	//update-end--Author:zhoujf  Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能
-	
+
 	/**
 	 * 将驼峰命名转化成下划线
 	 * @param para
@@ -519,18 +516,18 @@ public class oConvertUtils {
 	 */
 	public static String camelToUnderline(String para){
         if(para.length()<3){
-        	return para.toLowerCase(); 
+        	return para.toLowerCase();
         }
         StringBuilder sb=new StringBuilder(para);
         int temp=0;//定位
-        //从第三个字符开始 避免命名不规范 
+        //从第三个字符开始 避免命名不规范
         for(int i=2;i<para.length();i++){
             if(Character.isUpperCase(para.charAt(i))){
                 sb.insert(i+temp, "_");
                 temp+=1;
             }
         }
-        return sb.toString().toLowerCase(); 
+        return sb.toString().toLowerCase();
 	}
 
 	/**
@@ -546,10 +543,10 @@ public class oConvertUtils {
 		}
 		return sb.toString();
 	}
-	
+
 	/**
 	 * 获取类的所有属性,包括父类
-	 * 
+	 *
 	 * @param object
 	 * @return
 	 */
@@ -564,7 +561,7 @@ public class oConvertUtils {
 		fieldList.toArray(fields);
 		return fields;
 	}
-	
+
 	/**
 	  * 将map的key全部转成小写
 	 * @param list
@@ -574,10 +571,10 @@ public class oConvertUtils {
 		List<Map<String, Object>> select = new ArrayList<>();
 		for (Map<String, Object> row : list) {
 			 Map<String, Object> resultMap = new HashMap<>();
-			 Set<String> keySet = row.keySet(); 
-			 for (String key : keySet) { 
-				 String newKey = key.toLowerCase(); 
-				 resultMap.put(newKey, row.get(key)); 
+			 Set<String> keySet = row.keySet();
+			 for (String key : keySet) {
+				 String newKey = key.toLowerCase();
+				 resultMap.put(newKey, row.get(key));
 			 }
 			 select.add(resultMap);
 		}

+ 11 - 23
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/CASServiceUtil.java

@@ -1,14 +1,5 @@
 package org.jeecg.modules.cas.util;
 
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.security.cert.X509Certificate;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
 import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.conn.socket.LayeredConnectionSocketFactory;
@@ -16,18 +7,15 @@ import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.security.cert.X509Certificate;
+
 public class CASServiceUtil {
-	
-	public static void main(String[] args) {
-		String serviceUrl = "https://cas.8f8.com.cn:8443/cas/p3/serviceValidate";
-		String service = "http://localhost:3003/user/login";
-		String ticket = "ST-5-1g-9cNES6KXNRwq-GuRET103sm0-DESKTOP-VKLS8B3";
-		String res = getSTValidate(serviceUrl,ticket, service);
-		
-		System.out.println("---------res-----"+res);
-	}
-	
-	
 	/**
      * 验证ST
      */
@@ -45,7 +33,7 @@ public class CASServiceUtil {
 		return "";
 	}
 
-    
+
     /**
      * 读取 response body 内容为字符串
      *
@@ -62,8 +50,8 @@ public class CASServiceUtil {
         }
         return result;
     }
-    
-    
+
+
     /**
      * 创建模拟客户端(针对 https 客户端禁用 SSL 验证)
      *

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

@@ -1,19 +1,7 @@
 package org.jeecg.modules.cas.util;
 
 
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
+import lombok.extern.slf4j.Slf4j;
 import org.w3c.dom.Document;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
@@ -21,7 +9,13 @@ import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.DefaultHandler;
 
-import lombok.extern.slf4j.Slf4j;
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.StringReader;
+import java.util.*;
 
 /**
  * 解析cas,ST验证后的xml
@@ -177,8 +171,8 @@ public final class XmlUtils {
 
         return builder.toString();
     }
-    
-    
+
+
     public static Map<String, Object> extractCustomAttributes(final String xml) {
         final SAXParserFactory spf = SAXParserFactory.newInstance();
         spf.setNamespaceAware(true);
@@ -195,7 +189,7 @@ public final class XmlUtils {
             return Collections.emptyMap();
         }
     }
-    
+
     private static class CustomAttributeHandler extends DefaultHandler {
 
         private Map<String, Object> attributes;
@@ -258,35 +252,4 @@ public final class XmlUtils {
             return this.attributes;
         }
     }
-    
-    
-    public static void main(String[] args) {
-		String result = "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>\r\n" + 
-				"    <cas:authenticationSuccess>\r\n" + 
-				"        <cas:user>admin</cas:user>\r\n" + 
-				"        <cas:attributes>\r\n" + 
-				"            <cas:credentialType>UsernamePasswordCredential</cas:credentialType>\r\n" + 
-				"            <cas:isFromNewLogin>true</cas:isFromNewLogin>\r\n" + 
-				"            <cas:authenticationDate>2019-08-01T19:33:21.527+08:00[Asia/Shanghai]</cas:authenticationDate>\r\n" + 
-				"            <cas:authenticationMethod>RestAuthenticationHandler</cas:authenticationMethod>\r\n" + 
-				"            <cas:successfulAuthenticationHandlers>RestAuthenticationHandler</cas:successfulAuthenticationHandlers>\r\n" + 
-				"            <cas:longTermAuthenticationRequestTokenUsed>false</cas:longTermAuthenticationRequestTokenUsed>\r\n" + 
-				"        </cas:attributes>\r\n" + 
-				"    </cas:authenticationSuccess>\r\n" + 
-				"</cas:serviceResponse>";
-		
-		String errorRes = "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>\r\n" + 
-				"    <cas:authenticationFailure code=\"INVALID_TICKET\">未能够识别出目标 &#39;ST-5-1g-9cNES6KXNRwq-GuRET103sm0-DESKTOP-VKLS8B3&#39;票根</cas:authenticationFailure>\r\n" + 
-				"</cas:serviceResponse>";
-		
-		String error = XmlUtils.getTextForElement(errorRes, "authenticationFailure");
-		System.out.println("------"+error);
-		
-		String error2 = XmlUtils.getTextForElement(result, "authenticationFailure");
-		System.out.println("------"+error2);
-		String principal = XmlUtils.getTextForElement(result, "user");
-		System.out.println("---principal---"+principal);
-		Map<String, Object> attributes = XmlUtils.extractCustomAttributes(result);
-		System.out.println("---attributes---"+attributes);
-	}
 }

+ 0 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/RuleEngineServiceImpl.java

@@ -11,11 +11,9 @@ public class RuleEngineServiceImpl implements IRuleEngineService {
     @Override
     public void executeAddRule(QueryParam param) {
         log.info("参数数据:"+param.getParamId()+";"+param.getParamSign());
-        System.out.println("add success");
     }
     @Override
     public void executeRemoveRule(QueryParam param) {
         log.info("参数数据:"+param.getParamId()+";"+param.getParamSign());
-        System.out.println("remove success");
     }
 }

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

@@ -37,7 +37,6 @@ public class SendMsgJob implements Job {
 		queryWrapper.eq("es_send_status", SendMsgStatusEnum.WAIT.getCode())
 				.or(i -> i.eq("es_send_status", SendMsgStatusEnum.FAIL.getCode()).lt("es_send_num", 6));
 		List<SysMessage> sysMessages = sysMessageService.list(queryWrapper);
-		System.out.println(sysMessages);
 		// 2.根据不同的类型走不通的发送实现类
 		for (SysMessage sysMessage : sysMessages) {
 			ISendMsgHandle sendMsgHandle = null;

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/opencv/utils/CornerCheck.java

@@ -220,8 +220,8 @@ public class CornerCheck {
             List<Point> checkPoints = new ArrayList<>();
             Point rightDown = cornerPoints.get(cornerPoints.size() - 1);
             for (Point point : cornerPoints) {
-                System.out.println("cornerPoint:" + point.toString());
-                System.out.println(imageGR.get((int) point.y, (int) point.x)[1]);
+//                System.out.println("cornerPoint:" + point.toString());
+//                System.out.println(imageGR.get((int) point.y, (int) point.x)[1]);
                 if (imageGR.get((int) point.y, (int) point.x)[1] >= 120) {
                     if (point.x <= rightDown.x) {
                         checkPoints.add(point);

+ 1 - 15
jeecg-boot-module-system/src/main/java/org/jeecg/modules/opencv/utils/ExtractionVideoKeyFrames.java

@@ -51,9 +51,7 @@ public class ExtractionVideoKeyFrames {
 
     int ExtractKeyframes(String videoPath, double rate, String outImgPath){
         VideoCapture cap = new VideoCapture();
-        System.out.println(cap.isOpened());
         if (!cap.open(videoPath)) {
-            System.out.println("Open video file error!");
             return -1;
         }
 
@@ -66,7 +64,6 @@ public class ExtractionVideoKeyFrames {
         int height = (int)cap.get(Videoio.CAP_PROP_FRAME_HEIGHT);
         float fps = (float)cap.get(Videoio.CAP_PROP_FPS);
         int nframes = (int)cap.get(Videoio.CAP_PROP_FRAME_COUNT);
-        System.out.println("W:"+width+";H:"+height+";FPS:"+fps+";N:"+nframes);
 
         int nscale = 1;
         if (width%4==0 && height%4==0){
@@ -104,11 +101,8 @@ public class ExtractionVideoKeyFrames {
 
             double aseV = rate;
             if (histB.empty()){
-                System.out.println(aseV);
-            }
-            else{
+            } else{
                 aseV = computeASE(histA, histB);
-                System.out.println(aseV);
             }
 
             if (aseV >= rate) {
@@ -129,16 +123,8 @@ public class ExtractionVideoKeyFrames {
                 return -2;
             }
         }
-        System.out.println("NFRAMES(in reality)="+nCount);
 
         double toc = (double)Core.getTickCount();
-        System.out.println("ELAPSED TIME="+(toc-tic)/Core.getTickFrequency());
         return 0;
     }
-
-    public static void main(String[] args) {
-        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
-        ExtractionVideoKeyFrames evf = new ExtractionVideoKeyFrames();
-        evf.ExtractKeyframes("D:\\data\\fill.mp4",0.5,"D:\\data\\");
-    }
 }

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/opencv/utils/VideoProcessing.java

@@ -36,7 +36,6 @@ public class VideoProcessing {
 
             //获取视频总帧数
             int ftp = fFmpegFrameGrabber.getLengthInFrames();
-            System.out.println("时长 " + ftp / fFmpegFrameGrabber.getFrameRate() / 60);
             LoadFileUtil.checkFile(filePackageName);
             while (flag <= ftp) {
                 frame = fFmpegFrameGrabber.grabImage();

+ 1 - 10
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/aspect/UrlMatchEnum.java

@@ -46,13 +46,4 @@ public enum UrlMatchEnum {
         }
         return null;
     }
-
-
-    public static void main(String[] args) {
-        /**
-         * 比如request真实请求URL: /online/cgform/api/getData/81fcf7d8922d45069b0d5ba983612d3a
-         * 转换匹配路由URL后(对应配置的菜单路径):/online/cgformList/81fcf7d8922d45069b0d5ba983612d3a
-         */
-        System.out.println(UrlMatchEnum.getMatchResultByUrl("/online/cgform/api/getData/81fcf7d8922d45069b0d5ba983612d3a"));
-    }
-}
+}

+ 0 - 13
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java

@@ -195,19 +195,6 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
 		//update-end--Author:Steve  Date:20190201 for:组织机构添加数据代码调整
 	}
 
-
-	/**
-	 * removeDepartDataById 对应 delete方法 根据ID删除相关部门数据
-	 *
-	 */
-	/*
-	 * @Override
-	 *
-	 * @Transactional public boolean removeDepartDataById(String id) {
-	 * System.out.println("要删除的ID 为=============================>>>>>"+id); boolean
-	 * flag = this.removeById(id); return flag; }
-	 */
-
 	/**
 	 * updateDepartDataById 对应 edit 根据部门主键来更新对应的部门数据
 	 */

+ 2 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wps/util/upload/oss/WpsOSSUtil.java

@@ -8,6 +8,7 @@ import com.aliyun.oss.HttpMethod;
 import com.aliyun.oss.OSS;
 import com.aliyun.oss.OSSClient;
 import com.aliyun.oss.model.*;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.stereotype.Component;
 import org.springframework.web.multipart.MultipartFile;
@@ -20,6 +21,7 @@ import java.net.URL;
 import java.util.*;
 
 @Component
+@Slf4j
 public class WpsOSSUtil {
     public static final String fileUrlPrefix = "https://ctop-media.oss-cn-beijing.aliyuncs.com/";
     /**
@@ -136,7 +138,6 @@ public class WpsOSSUtil {
             client.shutdown();
         } catch (Exception e) {
             e.printStackTrace();
-            System.out.println("上传阿里云OSS服务器异常:"+e.getMessage());
         }
         return resultStr;
     }
@@ -157,7 +158,6 @@ public class WpsOSSUtil {
             // 指定上传的内容类型。内容类型决定浏览器将以什么形式、什么编码读取文件。如果没有指定则根据文件的扩展名生成,如果没有扩展名则为默认值application/octet-stream。
             meta.setContentType(getContentType(fileName));
             // 设置内容被下载时的名称。
-            System.out.println("downNmme"+downName);
             meta.setContentDisposition("filename="+downName);
             // 设置内容被下载时网页的缓存行为。
             meta.setCacheControl("no-cache");
@@ -199,7 +199,6 @@ public class WpsOSSUtil {
         map.put("response-content-disposition","attachment");
         request.setQueryParameter(map);
         URL url=ossClient.generatePresignedUrl(request);
-        System.out.println(url);
         return url;
     }
 
@@ -219,8 +218,6 @@ public class WpsOSSUtil {
      * */
     public static void deleteBucket(OSSClient client, String bucketName){
         client.deleteBucket(bucketName);
-        System.out.println("删除Bucket成功:"+bucketName);
-        //  logger.info("删除" + bucketName + "Bucket成功");
     }
 
     /**
@@ -250,8 +247,6 @@ public class WpsOSSUtil {
             resultStr = putResult.getETag();
         } catch (Exception e) {
             e.printStackTrace();
-            System.out.println("上传阿里云OSS服务器异常:"+e.getMessage());
-            //LOG.error("上传阿里云OSS服务器异常." + e.getMessage(), e);
         }
         return resultStr;
     }
@@ -351,7 +346,6 @@ public class WpsOSSUtil {
             client.shutdown();
         } catch (Exception e) {
             e.printStackTrace();
-            System.out.println("上传阿里云OSS服务器异常:"+e.getMessage());
         }
         return resultStr;
     }
@@ -377,7 +371,6 @@ public class WpsOSSUtil {
         OSSClient client =  getOSSClient();
         client.deleteObject(bucketName, diskName + key);
         client.shutdown();
-        System.out.println("删除" + bucketName + "下的文件" + diskName + key + "成功");
     }
 
     /**

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

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

+ 56 - 2
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -1,12 +1,17 @@
 package org.jeecg;
 
+import cn.com.ctop.common.module.entity.BindAccountLogin;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
+import cn.com.ctop.common.module.service.IBindAccountLoginService;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.service.IRefreshTokenService;
+import cn.com.ctop.common.module.utils.CtopAdConstant;
+import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceCreativeService;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -16,10 +21,16 @@ import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit4.SpringRunner;
 
 import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 @RunWith(SpringRunner.class)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 @ActiveProfiles("wps")
+@Slf4j
 public class SampleTest {
     @Autowired
     private ICtopOauthTokenService oauthTokenService;
@@ -36,14 +47,57 @@ public class SampleTest {
 
     @Test
     public void loadBytedanceCreativeData() {
-
      //   refreshTokenService.getKuaiShouAgentRefresh();
-
         String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
         String yesterday = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
         kuaiShouDailyAgentService.getAgentReportByPage(nowDate, nowDate);
     }
 
+    @Autowired
+    private IBindAccountLoginService bindAccountLoginService;
+    @Autowired
+    private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
+    @Test
+    public void loadKuaishouCookie(){
+        List<BindAccountLogin> list = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY,1);
+        if(list!=null&&!list.isEmpty()){
+            for (BindAccountLogin login:list) {
+                if(null==login.getCookie()||"".equals(login.getCookie().trim())){
+                    kuaishouWebInterfaceService.getkuaishouWebLoginCookie(login);
+                }
+            }
+        }
+    }
+    static ExecutorService executorService = null;
+    //线程计数器
+    static CountDownLatch countDownLatch = null;
+
+    @Test
+    public void deleteKuaishouComment(){
+        Long start = System.currentTimeMillis();
+        List<BindAccountLogin>loginList = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY,1);
+        if (loginList != null && !loginList.isEmpty()) {
+            executorService = Executors.newFixedThreadPool(5);
+            countDownLatch = new CountDownLatch(loginList.size());
+            loginList.forEach(login -> executorService.submit(()->{
+                try {
+                    kuaishouWebInterfaceService.deleteAllComment(new HashMap<>(),login);
+                }catch (Exception e){
+                    log.error(e.getMessage(),e);
+                }finally {
+                    countDownLatch.countDown();
+                }
+            }));
+            try {
+                countDownLatch.await();
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            Long end = System.currentTimeMillis();
+            log.info("快手删评论所用时长:{}毫秒",end-start);
+        }
+    }
+
     @Test
     public void testLoadBytedanceData() {
         CtopOauthToken token = oauthTokenService.getTokenByAccountId(1673731621920840L);

+ 0 - 9
module-common/src/main/java/cn/com/ctop/common/module/file/FileTypeJudge.java

@@ -79,7 +79,6 @@ public class FileTypeJudge {
 
 
        for (FileType type : fileTypes) {
-    	   System.out.println(type.getValue());
            if (fileHead.startsWith(type.getValue())) {
                return type;
            }
@@ -137,12 +136,4 @@ public class FileTypeJudge {
        }
        return type;
    }
-
-/*   public static void main(String args[]) throws Exception {
-       // System.out.println(FileTypeJudge.getType(new FileInputStream("")));
-       for (FileType type : FileType.values()) {
-           System.out.print(type + "\t");
-       }
-   }
-   */
 }

+ 0 - 17
module-common/src/main/java/cn/com/ctop/common/module/utils/HttpUtils.java

@@ -417,18 +417,6 @@ public class HttpUtils {
         return strReturn;
     }
 
-    public static void main(String[] args){
-        String res = HttpUtils.getKuaishouShareUrl("http://yongzhou.s.gifshow.com/i/photo/lwx?userId=1400097524&photoId=5191805968879099278");
-        String path = res.split("\\?")[0];
-        String photoId = path.substring(path.lastIndexOf("/")+1,path.length());
-        path =path.substring(0,path.lastIndexOf("/"));
-        String uid = path.substring(path.lastIndexOf("/")+1,path.length());
-        System.out.println(uid);
-        System.out.println(photoId);
-        res = HttpUtils.postKuaishouVideoUrl("https://live.kuaishou.com/m_graphql",uid,photoId);
-        System.out.println(res);
-    }
-
     public static String postKuaishouVideoUrl(String url,String uid,String photoId){
         HttpClient httpClient = createSslClientDefault();
         String strReturn = "";
@@ -472,10 +460,8 @@ public class HttpUtils {
             httpGet.setHeader("Accept-Language", "zh-CN,zh;q=0.9");
             response = httpClient.execute(httpGet);
             int statusCode = response.getStatusLine().getStatusCode();
-            System.out.println(statusCode);
             if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
                 String newUrl = response.getFirstHeader("Location").getValue();
-                System.out.println(newUrl);
                 return newUrl;
             }
 
@@ -494,10 +480,8 @@ public class HttpUtils {
             httpGet.setHeader("User-Agent", USER_AGENT);
             response = httpClient.execute(httpGet);
             int statusCode = response.getStatusLine().getStatusCode();
-            System.out.println(statusCode);
             if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
                 String newUrl = response.getFirstHeader("Location").getValue();
-                System.out.println(newUrl);
                 return httpGetRequest(newUrl);
             } else if (statusCode == HttpStatus.SC_OK) {
                 BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
@@ -913,7 +897,6 @@ public class HttpUtils {
     }
 
     public static JSONObject feishuGetRequest(String accessToken, String url, JSONObject params) {
-        System.out.println(url);
         // 构造请求
         HttpEntityEnclosingRequestBase httpEntity = new HttpEntityEnclosingRequestBase() {
             @Override

+ 2 - 17
module-common/src/main/java/cn/com/feishu/provider/SendImage.java

@@ -1,6 +1,5 @@
 package cn.com.feishu.provider;
 
-import org.apache.http.Header;
 import org.apache.http.HttpEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpPost;
@@ -19,6 +18,7 @@ import org.apache.http.impl.client.HttpClients;
 import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.apache.http.ssl.SSLContextBuilder;
 import org.apache.http.util.EntityUtils;
+
 import java.io.File;
 import java.io.IOException;
 import java.security.KeyManagementException;
@@ -64,26 +64,11 @@ public class SendImage {
         post.setEntity(multiPartEntity);
         post.setHeader("Authorization", "Bearer "+tenantAccessToken);
         CloseableHttpResponse response = client.execute(post);
-        System.out.println("http response code:" + response.getStatusLine().getStatusCode());
-        for (Header header: response.getAllHeaders()) {
-            System.out.println(header.toString());
-        }
+
         HttpEntity resEntity = response.getEntity();
         if (resEntity == null) {
-            System.out.println("never here?");
             return "";
         }
-        System.out.println("Response content length: " + resEntity.getContentLength());
         return EntityUtils.toString(resEntity);
     }
-    public static void main(String[] args) throws Exception {
-        File file = new File("D:\\android\\15812888.jpeg");
-        String token = AuthProvider.getTenantAccessToken();
-        String result = SendImageByApacheHttpClient(file,token);
-        System.out.println(result);
-        /**
-         * {"code":0,"msg":"ok","data":{"image_key":"img_f8bb4cdf-fd0b-4c29-98c5-5147efd4b13g"}}
-         */
-    }
-
 }

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

@@ -191,7 +191,6 @@ public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouRep
                 String listUrl = "https://agent.e.kuaishou.com/rest/dsp/agent/account/data/list";
                 String postData = "{\"agentId\":403756224,\"startDate\":\"" + currentDate + "\",\"endDate\":\"" + currentDate + "\",\"isAscending\":false,\"pageInfo\":{\"pageSize\":19,\"currentPage\":1,\"totalCount\":999999}}";
                 String result = HttpUtils2.httpPostRequestTest(listUrl, postData, headerMap);
-                System.out.println(result);
                 ObjectMapper mapper = new ObjectMapper();
                 JsonNode resultNode = mapper.readTree(result);
                 Integer code = resultNode.get("result").intValue();

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

@@ -178,7 +178,6 @@ public class ByteDanceCampaignServiceImpl extends ServiceImpl<ByteDanceCampaignM
         params.put("page", pageNumber + "");
         params.put("page_size", 100);
         String result = HttpUtils.httpGetRequest(url, headers, params);
-        System.out.println(result);
         JSONObject jsonObject = JSONObject.parseObject(result);
         Integer code = jsonObject.getInteger("code");
         if (null == code || !code.equals(0)) {

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

@@ -227,7 +227,6 @@ public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeM
         data.put("advertiser_id", token.getAccountId());
         data.put("ad_id",planId);
         JSONObject result = HttpUtils.bytedanceGetRequest(token.getAccessToken(),url,data);
-        System.out.println(result);
         Integer code = result.getInteger("code");
         String message = result.getString("message");
         if (null ==  code) {

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

@@ -90,7 +90,6 @@ public class ByteDanceVideoReportDailyController {
 		for(int i=0; i<=days; i++){
 			String endStr = DateUtils.addDay(startDate ,i);
 			dateList.add(endStr);
-			System.out.println(endStr);
 		}
 
 		final ExecutorService executorService = Executors.newFixedThreadPool(8);
@@ -99,7 +98,6 @@ public class ByteDanceVideoReportDailyController {
 				@Override
 				public void run() {
 					try {
-						System.out.println("头条视频按天汇总接口现在在跑的时间为:" + date + "~" + date);
 						videoReportDailyService.videoInfoListByAccountId(date, date,accountId);
 					} catch (Exception e) {
 						e.printStackTrace();

+ 5 - 25
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportDailyAgentServiceImpl.java

@@ -12,35 +12,18 @@ import org.openqa.selenium.WebElement;
 import org.openqa.selenium.chrome.ChromeDriver;
 import org.openqa.selenium.chrome.ChromeOptions;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
 
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
+@Service
 public class BytedanceReportDailyAgentServiceImpl implements IBytedanceReportDailyAgentService {
-//    @Value("${jeecg.path.chrome-driver}")
-    private String chromeDriver = "D:/chromedriver.exe";
-    public static void main(String[] args){
-        BytedanceReportDailyAgentServiceImpl i = new BytedanceReportDailyAgentServiceImpl();
-        //账户列表 get
-        //https://agent.oceanengine.com/agent/optimize/adv-manage/adv-list/history/?beginDate=2020-07-03&endDate=2020-07-03&page=1&size=10&sortDir=descend&sortField=salesCost
-        //公司列表 post
-        //https://agent.oceanengine.com/agent/optimize/adv-company-manage/company-list/history/
-        /**
-         * Content-Disposition: form-data; name="page"
-         * 1
-         * Content-Disposition: form-data; name="size"
-         * 10
-         * Content-Disposition: form-data; name="sortField"
-         * advertiserCompanyCost
-         * Content-Disposition: form-data; name="sortDir"
-         * descend
-         * Content-Disposition: form-data; name="beginDate"
-         * 2020-07-01
-         */
-        i.loginAgent();
-    }
+    @Value("${jeecg.path.chrome-driver}")
+    private String chromeDriver;
+
     public boolean loginAgent() {
         boolean loginStatus = false;
         System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
@@ -69,11 +52,8 @@ public class BytedanceReportDailyAgentServiceImpl implements IBytedanceReportDai
             passwordElement.sendKeys("HCST-hcst888");
             WebElement captchaElement = webDriver.findElement(By.xpath("//div[contains(@class,'custom-toutiao-captcha')]"));
             String bg = captchaElement.getCssValue("background-image");
-            System.out.println(bg.split("\"")[1]);
             String result = ChaojiyingUtils.process(bg.split(",")[1],1004);
-            //{"err_no":0,"err_str":"OK","pic_id":"9109919322855101177","pic_str":"jdww","md5":"230db313e423211fcd989a9b4797fd87"}
             WebElement captchaInputElement = webDriver.findElement(By.xpath("//input[@name='captcha']"));
-            System.out.println(result);
             WebElement loginElement = webDriver.findElement(By.xpath("//div[contains(text(),'登录')]"));
             Thread.sleep(3000L);
             //点击登录

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

@@ -155,7 +155,6 @@ public class ReportServiceImpl implements IReportService {
         var jsonObject = JSONObject.parseObject(JSON.toJSONString(conditions, config));
 
         JSONObject getObject = getAdStat(token, jsonObject);
-       // System.out.println(conditions.getStartDate()  + " "  + conditions.getEndDate() + " " + getObject.getString("request_id"));
         if (null == getObject) {
             log.error("广告计划报表数据获取异常=》account:{};message:{}", token.getAccountId(), "返回数据异常");
             return;

+ 0 - 21
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/utils/ApkUtils.java

@@ -181,7 +181,6 @@ public class ApkUtils {
                                     if(icon.contains(".png")){
                                         icon = icon.replace(".png", "");
                                     }
-                                    System.out.println("获取icon名称:" + icon);
                                     break;
                                 }
                             }
@@ -195,9 +194,7 @@ public class ApkUtils {
             while ((ze2 = zipIns2.getNextEntry()) != null) {
                 if (!ze2.isDirectory()) {
                     String name = ze2.getName();
-                    System.out.println(name);
                     if(name.contains(icon.trim())){
-                        System.out.println(11111);
                         FileOutputStream fos = new FileOutputStream(new File("E:\\python\\img\\icon.png"));
                         int chunk = 0;
                         byte[] data = new byte[1024];
@@ -210,13 +207,6 @@ public class ApkUtils {
                 }
             }
 
-            ////////////////////////////////////////////////////////////////
-            //如果想要查看有哪些key ,可以把下面注释放开
-//            for (String keyName : rootDict.allKeys()) {
-//				System.out.println(keyName + ":" + rootDict.get(keyName).toString());
-//			  }
-
-
             // 应用包名
             NSString parameters = (NSString) rootDict.get("CFBundleIdentifier");
             map.put("package", parameters.toString());
@@ -227,7 +217,6 @@ public class ApkUtils {
             parameters = (NSString) rootDict.get("CFBundleVersion");
             map.put("versionCode", parameters.toString());
 
-            /////////////////////////////////////////////////
             infoIs.close();
             is.close();
             zipIns.close();
@@ -238,14 +227,4 @@ public class ApkUtils {
         }
         return map;
     }
-
-
-    public static void main(String[] args) {
-        System.out.println("======apk=========");
-        String apkUrl = "D:\\data\\YouYuan_1119929.apk";
-        Map<String,Object> mapApk = ApkUtils.readAPK(apkUrl);
-        for (String key : mapApk.keySet()) {
-            System.out.println(key + ":" + mapApk.get(key));
-        }
-    }
 }