Bläddra i källkod

去除无效打印

yumeng 5 år sedan
förälder
incheckning
47c9a88c63
32 ändrade filer med 61 tillägg och 192 borttagningar
  1. 0 1
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java
  2. 0 21
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  3. 0 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouDailyLoadFileJob.java
  4. 0 12
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouNowDateGroupJob.java
  5. 3 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/OceanengineJob.java
  6. 0 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/opencv/CornerCheck.java
  7. 0 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/opencv/Perspective.java
  8. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/opencv/VideoProcessing.java
  9. 3 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/test/service/impl/JeecgDemoServiceImpl.java
  10. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/PerformanceServiceImpl2.java
  11. 0 1
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  12. 0 2
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/CorpWeixinServiceImpl.java
  13. 0 1
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java
  14. 0 2
      module-common/src/main/java/cn/com/ctop/common/module/utils/HttpUtils.java
  15. 0 1
      module-common/src/main/java/cn/com/ctop/common/module/utils/HttpUtils2.java
  16. 0 3
      module-common/src/main/java/cn/com/ctop/common/module/utils/JavacvUtil.java
  17. 2 19
      module-common/src/main/java/cn/com/ctop/common/module/utils/MpsUtils.java
  18. 0 3
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/appium/service/impl/AppiumJobServiceImpl.java
  19. 2 16
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/core/util/AppiumUtil.java
  20. 0 11
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/core/util/KuaimiUtil.java
  21. 0 3
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeCompanyServiceImpl.java
  22. 0 10
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/jiema/service/impl/KuaimiServiceImpl.java
  23. 0 1
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/jiema/service/impl/WumaServiceImpl.java
  24. 0 9
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/test/AppiumTest.java
  25. 0 2
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouController.java
  26. 0 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouConversionTypesController.java
  27. 0 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupCreateLogController.java
  28. 0 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouUpdateServiceImpl.java
  29. 0 5
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java
  30. 51 48
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyAgentServiceImpl.java
  31. 0 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportHourlyCampaignServiceImpl.java
  32. 0 1
      moudule-eureca/.mvn/wrapper/MavenWrapperDownloader.java

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

@@ -971,7 +971,6 @@ public class DateUtils extends PropertyEditorSupport {
         calendar.setFirstDayOfWeek(Calendar.FRIDAY);
         calendar.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);
         DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
-        System.out.println(df.format(calendar.getTime()));
         return calendar.getTime();
     }
 

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

@@ -99,10 +99,6 @@ public class TestController {
             String startDate = DateUtils.addMonth(endDateStr, -6);
             QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
             tokenQueryWrapper.eq("media_id", 2);
-            System.err.println(startDate);
-            System.err.println(endDateStr);
-
-
             List<CtopOauthToken> ctopOauthTokens = oauthTokenMapper.selectList(tokenQueryWrapper);
             if (!Check.isNull(ctopOauthTokens)) {
                 for (CtopOauthToken token : ctopOauthTokens) {
@@ -126,13 +122,8 @@ public class TestController {
             String startDate = DateUtils.addMonth(endDateStr, -6);
             QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
             tokenQueryWrapper.eq("media_id", 2);
-            System.err.println(startDate);
-            System.err.println(endDateStr);
-
-
             historyReportTaskService.getTaskList();
 
-
         } catch (Exception e) {
             e.printStackTrace();
             result.setSuccess(false);
@@ -205,7 +196,6 @@ public class TestController {
                 @Override
                 public void run() {
                     try {
-                        System.err.println("获取创意,accountId:" + token.getAccountId());
                         kuaishouInterfaceService.getCreativeList(token, null, null);
                         //  kuaishouInterfaceService.getVideoList2(token, null, null,1);
                         //3: 获取图片信息数据
@@ -261,7 +251,6 @@ public class TestController {
                 oauthTokenQueryWrapper.eq("account_id", accountId);
                 CtopOauthToken ctopOauthToken = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
 
-                System.err.println("创意报表accountId:" + ctopOauthToken.getAccountId());
                 QueryWrapper<KuaiShouCampaign> campaignQueryWrapper = new QueryWrapper<>();
                 campaignQueryWrapper.eq("account_id", accountId);
                 List<KuaiShouCampaign> list = campaignService.list(campaignQueryWrapper);
@@ -356,7 +345,6 @@ public class TestController {
     public static void main(String[] args) throws ParseException {
         String date = DateUtils.getDate("yyyy-MM-dd");
         String anotherDay = DateUtils.getAnotherDay("yyyy-MM-dd", date, -1);
-        System.err.println(anotherDay);
     }
 
 
@@ -368,11 +356,9 @@ public class TestController {
         oauthTokenQueryWrapper.last("limit 1");
         CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
         try {
-            System.err.println("获取计划,广告组:" + accountId);
             kuaishouInterfaceService.getCampaignList(token, null, null);
             //1:获取全量广告组数据
             kuaishouInterfaceService.getGroupList(token, null, null);
-            System.err.println("获取计划,广告组:" + accountId);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -390,9 +376,7 @@ public class TestController {
         CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
 
         try {
-            System.err.println("获取创意,accountId:" + token.getAccountId());
             kuaishouInterfaceService.getCreativeList(token, null, null);
-            System.err.println("获取创意结束,accountId:" + token.getAccountId());
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -416,9 +400,6 @@ public class TestController {
                 oauthTokenQueryWrapper.eq("media_id", 2);
                 oauthTokenQueryWrapper.eq("account_id", accountId);
                 CtopOauthToken ctopOauthToken = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
-                System.err.println("创意报表accountId:" + ctopOauthToken.getAccountId());
-
-
                 QueryWrapper<KuaiShouCampaign> campaignQueryWrapper = new QueryWrapper<>();
                 campaignQueryWrapper.eq("account_id", ctopOauthToken.getAccountId());
 
@@ -795,7 +776,6 @@ public class TestController {
             executorService.submit(new Runnable() {
                 @Override
                 public void run() {
-                    System.err.println(signature);
                     cleanMaterialService.calculationReport(signature);
                 }
             });
@@ -824,7 +804,6 @@ public class TestController {
                     } catch (ParseException e) {
                         e.printStackTrace();
                     }
-                    System.err.println("获取广告主报表,accountId:" + token.getAccountId());
                     kuaishouInterfaceService.getAdvertiserReportDaily(token, startDate, endDate);
 
                     Thread.sleep(1 * 200);

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

@@ -69,10 +69,4 @@ public class KuaishouDailyLoadFileJob implements Job {
     }
 
 
-    public static void main(String[] args) {
-        String nowDate = DateUtils.getDate("yyyy-MM-dd");
-        String statDate = getAnotherDay("yyyy-MM-dd", nowDate, -1);
-
-        System.err.println(statDate);
-    }
 }

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

@@ -65,16 +65,4 @@ public class KuaishouNowDateGroupJob implements Job {
 
     }
 
-   /* public static void main(String[] args) throws ParseException {
-        Date nowDate  = DateUtils.getDate();
-        String anotherDay = DateUtils.getAnotherDay("yyyy-MM-dd", DateUtils.formatDate(nowDate), -1);
-
-
-
-        SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
-        Date endDate = sim.parse(anotherDay);
-        String s = DateUtils.formatDate(endDate);
-        System.err.println(s);
-
-    }*/
 }

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

@@ -14,6 +14,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.http.impl.cookie.BasicClientCookie;
 import org.bytedeco.javacv.FFmpegFrameGrabber;
 import org.bytedeco.javacv.Frame;
@@ -37,6 +38,7 @@ import java.net.URL;
 import java.util.List;
 import java.util.*;
 
+@Slf4j
 public class OceanengineJob implements Job {
     @Value("${jeecg.path.chrome-driver}")
     private String chromeDriver;
@@ -257,7 +259,7 @@ public class OceanengineJob implements Job {
         hotMaterialHandler(1,4,"抖音");
         hotMaterialHandler(1,8,"头条");
         hotMaterialHandler(1,9,"穿山甲");
-        System.out.println("巨量创意抓取完成");
+        log.info("巨量创意抓取完成");
     }
 
     private void login(String account,String password){

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

@@ -117,7 +117,6 @@ public class CornerCheck {
             });
             Imgcodecs.imwrite("D:\\data\\coners.jpg", dst);
             for (Point p : cornerPoints) {
-                System.out.println(p.toString());
             }
             result.put("leftTop", cornerPoints.get(0));
             result.put("rightBottom", cornerPoints.get(3));
@@ -129,7 +128,6 @@ public class CornerCheck {
                 result.put("leftBottom", cornerPoints.get(1));
             }
             ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
-            System.out.println(result.toString());
             return result;
         } catch (Exception e) {
             e.printStackTrace();

+ 0 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/opencv/Perspective.java

@@ -40,8 +40,6 @@ public class Perspective {
             Mat dstPoints = Converters.vector_Point_to_Mat(perspectivePoints, CvType.CV_32F);
             Mat perspectiveMmat = Imgproc.getPerspectiveTransform(srcPoints, dstPoints);
             Imgproc.warpPerspective(src, dst, perspectiveMmat, dst.size(), Imgproc.INTER_LINEAR);
-            System.out.println("cols:" + dst1.cols());
-            System.out.println("rows:" + dst1.rows());
             for (int i = 0; i < dst1.cols(); i++) {
                 for (int j = 0; j < dst1.rows(); j++) {
                     Point point = new Point();
@@ -56,7 +54,6 @@ public class Perspective {
             Imgcodecs.imwrite(targetFileName, dst);
         } catch (Exception e) {
             e.printStackTrace();
-            System.out.println("例外:" + e);
         }
     }
 

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

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

+ 3 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/test/service/impl/JeecgDemoServiceImpl.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.demo.test.service.impl;
 
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.system.base.service.impl.JeecgServiceImpl;
 import org.jeecg.modules.demo.test.entity.JeecgDemo;
 import org.jeecg.modules.demo.test.mapper.JeecgDemoMapper;
@@ -15,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
  * @Date:  2018-12-29
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class JeecgDemoServiceImpl extends JeecgServiceImpl<JeecgDemoMapper, JeecgDemo> implements IJeecgDemoService {
 	@Autowired
@@ -55,8 +57,7 @@ public class JeecgDemoServiceImpl extends JeecgServiceImpl<JeecgDemoMapper, Jeec
 	@Cacheable(cacheNames="jeecgDemo", key="#id")
 	public JeecgDemo getByIdCacheable(String id) {
 		JeecgDemo t = jeecgDemoMapper.selectById(id);
-		System.err.println("---未读缓存,读取数据库---");
-		System.err.println(t);
+		log.error("---未读缓存,读取数据库---");
 		return t;
 	}
 

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

@@ -1282,7 +1282,6 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
         //TODO ctop_project表有修改,需要进行相对应的变化
         //获取所有project根据媒体类型获取快手下的项目类型 1-头条 2-快手
         List<ProjectDTO> projectDTOS = userEfficientVideoMapMapper.getProjects("1");
-        System.out.println("头条项目数量为:" + projectDTOS.size());
 
         //循环project
         for (ProjectDTO projectDTO : projectDTOS) {

+ 0 - 1
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -73,7 +73,6 @@ public class SampleTest {
             param.put("task_ids", taskIds);
             String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
-            System.err.println(resultJson);*/
 
 
           /*  String url = "https://ad.e.kuaishou.com/rest/openapi/v1/async_task/download";

+ 0 - 2
module-common/src/main/java/cn/com/ctop/common/module/service/impl/CorpWeixinServiceImpl.java

@@ -36,10 +36,8 @@ public class CorpWeixinServiceImpl implements ICorpWeixinService {
         WxCpOAuth2Service wxCpOAuth2Service = new WxCpOAuth2ServiceImpl(service);
         try {
 //            WxCpOauth2UserInfo userInfo = wxCpOAuth2Service.getUserInfo(1000002,"_Mq0Dx1dynryHsgBkoU1dAk5A3Y7lrfg8V0GDv4ocWQ");
-//            System.out.println(new Gson().toJson(userInfo));
 //            WxCpUserService wxCpUserService = new WxCpUserServiceImpl(service);
 //            WxCpUser user = wxCpUserService.getById("YiErSanSi");
-//            System.out.println(new Gson().toJson(user));
             WxCpMessage message = new WxCpMessage();
             message.setToUser("YiErSanSi");
             message.setAgentId(1000002);

+ 0 - 1
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -117,7 +117,6 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
     public static void main(String[] args) {
         String reg = "(mp4|flv|avi|rm|rmvb|wmv)";
         Pattern p = Pattern.compile(reg);
-        System.out.println(p.matcher("https://ctop-media.oss-cn-beijing.aliyuncs.com/video/2019-10-30/ios%E6%8E%A8%E5%B9%BF%E8%A7%86%E9%A2%91-1572437289724.mp4").find());
     }
 
     @Autowired

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

@@ -678,7 +678,6 @@ public class HttpUtils {
                 }
             }
             HttpEntity respEntity;
-            System.err.println(httpget);
             HttpResponse response = httpclient.execute(httpget);
             respEntity = response.getEntity();
             result = EntityUtils.toString(respEntity);
@@ -755,7 +754,6 @@ public class HttpUtils {
             }
 
             HttpGet httpget = new HttpGet(url + "?" + postBody);
-            System.err.println(url + postBody);
             if (headers != null) {
                 Iterator<String> keyIter = headers.keySet().iterator();
                 while (keyIter.hasNext()) {

+ 0 - 1
module-common/src/main/java/cn/com/ctop/common/module/utils/HttpUtils2.java

@@ -550,7 +550,6 @@ public class HttpUtils2 {
                 }
             }
             HttpEntity respEntity;
-            System.err.println(httpget);
             HttpResponse response = httpclient.execute(httpget);
             respEntity = response.getEntity();
             result = EntityUtils.toString(respEntity);

+ 0 - 3
module-common/src/main/java/cn/com/ctop/common/module/utils/JavacvUtil.java

@@ -37,14 +37,12 @@ public class JavacvUtil {
         try {
             fFmpegFrameGrabber.start();
             int ftp = fFmpegFrameGrabber.getLengthInFrames();
-            System.out.println("开始视频提取帧");
             for (int i=0 ; i < ftp ; i++){
                 if( i >= start && i <= end){
                     frame = fFmpegFrameGrabber.grabImage();
                     doExecuteFrame(frame, filePath, fileTargetName, i ,files);
                 }
             }
-            System.out.println("============运行结束============");
             fFmpegFrameGrabber.stop();
         } catch (Exception e) {
             e.printStackTrace();
@@ -81,7 +79,6 @@ public class JavacvUtil {
 
     public static void main(String[] args) {
         List<File> files = videoIntercept(new File("C:\\Users\\宋英豪\\Desktop\\nfpHmswW.mp4"), 10, 100);
-        System.out.println(files);
     }
 
     /**

+ 2 - 19
module-common/src/main/java/cn/com/ctop/common/module/utils/MpsUtils.java

@@ -28,7 +28,6 @@ public class MpsUtils {
 //        arrangementSelect(a,3);
 //        String t = "https://ctop-part.oss-cn-beijing.aliyuncs.com/input/VIDEO_HEAD/2019-12-11/25-1576044510677.mp4";
 //        int i = t.indexOf("/",10);
-//        System.out.println(t.substring(i+1,t.length()-1));
 
        // MpsUtils mpsUtils = new MpsUtils();
        // mpsUtils.videoWaterMark("video/2019-12-20/20%E7%BD%91%E6%9C%8D-1576822566069.mp4","watermark/water1080-1920.png","8bcf0c98021c40fc96a95d60f55b1f10",720);
@@ -39,7 +38,6 @@ public class MpsUtils {
 //            while (true){
 //                QueryJobListResponse.Job job = mpsUtils.getJobStatus(jobId);
 //                job.getOutput().getOutputFile().getObject();
-//                System.out.println(new Gson().toJson(job));
 //                Thread.sleep(5000L);
 //            }
 //        } catch (InterruptedException e) {
@@ -57,7 +55,6 @@ public class MpsUtils {
         request.setJobIds(jobId);
         try {
             QueryJobListResponse response = client.getAcsResponse(request);
-            System.out.println(new Gson().toJson(response.getJobList().get(0)));
             job = response.getJobList().get(0);
         } catch (ClientException e) {
             e.printStackTrace();
@@ -80,8 +77,6 @@ public class MpsUtils {
      * @param n 选择个数
      */
     public static void arrangementSelect(String[] dataList, int n) {
-        System.out.println(String.format("A(%d, %d) = %d", dataList.length, n,
-                arrangement(n, dataList.length)));
         arrangementSelect(dataList, new String[n], 0);
     }
 
@@ -95,7 +90,6 @@ public class MpsUtils {
         int resultLen = resultList.length;
         // 全部选择完时,输出排列结果
         if (resultIndex >= resultLen) {
-            System.out.println(Arrays.asList(resultList));
             return;
         }
 
@@ -146,8 +140,7 @@ public class MpsUtils {
      * @param n 选择个数
      */
     public static void combinationSelect(String[] dataList, int n) {
-        System.out.println(String.format("C(%d, %d) = %d",
-                dataList.length, n, combination(n, dataList.length)));
+
         combinationSelect(dataList, 0, new String[n], 0);
     }
 
@@ -163,7 +156,6 @@ public class MpsUtils {
         int resultCount = resultIndex + 1;
         // 全部选择完时,输出组合结果
         if (resultCount > resultLen) {
-            System.out.println(Arrays.asList(resultList));
             return;
         }
 
@@ -256,13 +248,9 @@ public class MpsUtils {
         SubmitJobsResponse response;
         try {
             response = client.getAcsResponse(request);
-            System.out.println("RequestId is:"+response.getRequestId());
             if (response.getJobResultList().get(0).getSuccess()) {
                 jobId = response.getJobResultList().get(0).getJob().getJobId();
-                System.out.println("JobId is:" + response.getJobResultList().get(0).getJob().getJobId());
             } else {
-                System.out.println("SubmitJobs Failed code:" + response.getJobResultList().get(0).getCode() +
-                        " message:" + response.getJobResultList().get(0).getMessage());
             }
         } catch (ServerException e) {
             e.printStackTrace();
@@ -312,13 +300,10 @@ public class MpsUtils {
         SubmitJobsResponse response;
         try {
             response = client.getAcsResponse(request);
-            System.out.println("RequestId is:"+response.getRequestId());
             if (response.getJobResultList().get(0).getSuccess()) {
                 jobId = response.getJobResultList().get(0).getJob().getJobId();
-                System.out.println("JobId is:" + response.getJobResultList().get(0).getJob().getJobId());
             } else {
-                System.out.println("SubmitJobs Failed code:" + response.getJobResultList().get(0).getCode() +
-                        " message:" + response.getJobResultList().get(0).getMessage());
+
             }
         } catch (ServerException e) {
             e.printStackTrace();
@@ -338,8 +323,6 @@ public class MpsUtils {
         try {
             response = client.getAcsResponse(request);
             pipelineId = response.getPipelineList().get(0).getId();
-            System.out.println("PipelineName is:" + response.getPipelineList().get(0).getName());
-            System.out.println("PipelineId is:" + response.getPipelineList().get(0).getId());
         } catch (ServerException e) {
             e.printStackTrace();
         } catch (ClientException e) {

+ 0 - 3
module-crawler/src/main/java/cn/com/ctop/crawler/modules/appium/service/impl/AppiumJobServiceImpl.java

@@ -71,7 +71,6 @@ public class AppiumJobServiceImpl extends ServiceImpl<AppiumJobMapper, AppiumJob
                 Thread.sleep(3000L);
                 String packageName = androidDriver.getCurrentPackage();
                 String activityName = androidDriver.currentActivity();
-                System.out.println(packageName + ":" + activityName);
                 List<AppiumTaskItem> taskItems = taskItemMapper.selectByParams(packageName, activityName, taskId);
                 if (null != taskItems || taskItems.size() > 0) {
                     for (AppiumTaskItem item : taskItems) {
@@ -83,7 +82,6 @@ public class AppiumJobServiceImpl extends ServiceImpl<AppiumJobMapper, AppiumJob
         } catch (Exception e) {
             e.printStackTrace();
         }
-        System.out.println(kuaishouId);
         return kuaishouId;
     }
 
@@ -190,7 +188,6 @@ public class AppiumJobServiceImpl extends ServiceImpl<AppiumJobMapper, AppiumJob
             webDriver.get(GET_AGENT_DATA_URL + "st=" + stDate + "&et=" + etDate);
             Thread.sleep(1000L);
             String getData = webDriver.findElement(By.xpath("//pre[@style='word-wrap: break-word; white-space: pre-wrap;']")).getText();
-            System.out.println(getData);
         } catch (Exception e) {
             e.printStackTrace();
             log.error("爬取代理商数据异常");

+ 2 - 16
module-crawler/src/main/java/cn/com/ctop/crawler/modules/core/util/AppiumUtil.java

@@ -102,8 +102,6 @@ public class AppiumUtil {
         String mobile = setmobile;
         String pkg = androidDriver.getCurrentPackage();
         String activity = androidDriver.currentActivity();
-        System.out.println("当前包:" + pkg);
-        System.out.println("当前activity:" + activity);
         Boolean isContinue = true;
         if ("com.android.packageinstaller".equals(pkg)) {
             switch (activity) {
@@ -124,7 +122,7 @@ public class AppiumUtil {
                     WebElement doneBtn = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.android.packageinstaller:id/done_button");
 
                     if (centerText != null) {
-                        System.out.println(centerText.getText());
+                        log.info(centerText.getText());
                     }
                     if (doneBtn != null) {
                         doneBtn.click();
@@ -133,7 +131,7 @@ public class AppiumUtil {
                 default:
                     isContinue = false;
                     androidDriver.quit();
-                    System.out.println("当前activity无法处理");
+                    log.info("当前activity无法处理");
                     break;
             }
         } else if ("com.smile.gifmaker".equals(pkg)) {
@@ -198,7 +196,6 @@ public class AppiumUtil {
                 case "com.yxcorp.gifshow.profile.activity.MyProfileActivity":
                     WebElement loadingTitle = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/loading_title");
                     if (loadingTitle != null) {
-                        System.out.println(loadingTitle.getText());
                     }
                     tapPoint(androidDriver, 650, 400);
                     break;
@@ -206,7 +203,6 @@ public class AppiumUtil {
                 case "com.yxcorp.plugin.qrcode.MyQRCodeActivity":
                     WebElement kwaiId = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/kwai_id");
                     if (kwaiId != null) {
-                        System.out.println(kwaiId.getText());
                         isContinue = false;
                         androidDriver.quit();
                     }
@@ -222,7 +218,6 @@ public class AppiumUtil {
                     WebElement loginNameEt = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/login_name_et");
                     WebElement nextView = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/next_view");
                     if (loginTitleTv != null) {
-                        System.out.println(loginTitleTv.getText());
                         if ("输入密码".equals(loginTitleTv.getText())) {
                             WebElement forgetPsdBtn = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/forget_psd_btn");
                             if (forgetPsdBtn != null) {
@@ -329,23 +324,19 @@ public class AppiumUtil {
                     break;
                 default:
                     isContinue = false;
-                    System.out.println("当前activity无法处理");
                     break;
             }
         } else if ("cn.com.longene.www.myapplication".equals(pkg)) {
             switch (activity) {
                 case ".MainActivity":
                     isContinue = false;
-                    System.out.println("快手已崩溃");
                     break;
                 default:
                     isContinue = false;
                     androidDriver.quit();
-                    System.out.println("当前activity无法处理");
                     break;
             }
         } else {
-            System.out.println("当前包为非操作包:" + pkg);
         }
         if (isContinue) {
             isContinue = loginTask(androidDriver, token, mobile);
@@ -440,7 +431,6 @@ public class AppiumUtil {
             WebElement loginNameEt = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/login_name_et");
             WebElement nextView = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/next_view");
             if (loginTitleTv != null) {
-                System.out.println(loginTitleTv.getText());
                 if ("输入密码".equals(loginTitleTv.getText())) {
                     WebElement forgetPsdBtn = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/forget_psd_btn");
                     if (forgetPsdBtn != null) {
@@ -682,7 +672,6 @@ public class AppiumUtil {
             element.click();
         } else if ("point".equals(clickType)) {
             Point point = element.getLocation();
-            System.out.println(point.getX() + ":" + point.getY());
             Integer x = point.getX();
             Integer y = point.getY();
             if (null != taskItem.getOffsiteX()) {
@@ -704,7 +693,6 @@ public class AppiumUtil {
     public String runTask(AndroidDriver androidDriver, AppiumTaskItem appiumTaskItem, WebElement loopElement, String publishName) throws Exception {
         String getText = null;
         if (appiumTaskItem != null) {
-            System.out.println(new Gson().toJson(appiumTaskItem));
             if (appiumTaskItem.getWaitTime() != null && appiumTaskItem.getWaitTime() > 0) {
                 Thread.sleep(appiumTaskItem.getWaitTime());
             }
@@ -740,7 +728,6 @@ public class AppiumUtil {
                                 element.click();
                             } else if ("point".equals(appiumTaskItem.getClickType())) {
                                 Point point = element.getLocation();
-                                System.out.println(point.getX() + ":" + point.getY());
                                 Integer x = point.getX();
                                 Integer y = point.getY();
                                 if (null != appiumTaskItem.getOffsiteX()) {
@@ -782,7 +769,6 @@ public class AppiumUtil {
                 }
             } else if (appiumTaskItem.getLoopType() != null && "loop".equals(appiumTaskItem.getLoopType())) {
                 while (isLoop) {
-                    System.out.println("loop:" + isLoop);
                     if (appiumTaskItem.getFindType() != null) {
                         List<WebElement> list = getElementsByType(androidDriver, appiumTaskItem.getFindType(), appiumTaskItem.getFindKey());
                         if (list != null && list.size() > 0) {

+ 0 - 11
module-crawler/src/main/java/cn/com/ctop/crawler/modules/core/util/KuaimiUtil.java

@@ -15,7 +15,6 @@ public class KuaimiUtil {
     public static String kuaimiLogin() throws Exception {
         String result = HttpUtils.httpPostNoParamRequest(KUAIMI_API_URL + "?action=loginIn&name=xuzuoyun&password=heaven01");
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return result.split("\\|")[1];
         } else {
             throw new Exception();
@@ -25,9 +24,7 @@ public class KuaimiUtil {
     public static String getMobile(String token, String projectId) throws Exception {
         String url = KUAIMI_API_URL + "?action=getPhone&sid=" + projectId + "&token=" + token;
         String result = HttpUtils.httpPostNoParamRequest(url);
-        System.out.println(result);
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return result.split("\\|")[1];
         } else {
             throw new Exception();
@@ -38,7 +35,6 @@ public class KuaimiUtil {
         String url = KUAIMI_API_URL + "?action=getMessage&sid=" + projectId + "&token=" + token + "&phone=" + phone;
         String result = HttpUtils.httpPostNoParamRequest(url);
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return getNumbers(result.split("\\|")[1]);
         } else {
             throw new Exception();
@@ -49,7 +45,6 @@ public class KuaimiUtil {
         String url = KUAIMI_API_URL + "?action=addBlacklist&sid=" + projectId + "&token=" + token + "&phone=" + phone;
         String result = HttpUtils.httpPostNoParamRequest(url);
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return result.split("\\|")[1];
         } else {
             throw new Exception();
@@ -60,7 +55,6 @@ public class KuaimiUtil {
         String url = KUAIMI_API_URL + "?action=cancelRecv&sid=" + projectId + "&token=" + token + "&phone=" + phone;
         String result = HttpUtils.httpPostNoParamRequest(url);
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return result.split("\\|")[1];
         } else {
             throw new Exception();
@@ -79,26 +73,21 @@ public class KuaimiUtil {
     public static void main(String[] args) {
         String s = "【快手科技】重置密码的验证码469801,15分钟内有效,为保证信息安全,切勿将验证码告知他人。";
 //        String s = "【快手科技】503730快手验证码,15分钟内有效,仅用于登录,请勿告知他人。";
-        System.out.println(getNumbers(s));
 //
 //        KuaimiUtil k = new KuaimiUtil();
 //        try {
 //            String token = k.kuaimiLogin();
-//            System.out.println(token);
 //            String mobile = k.getMobile(token, "2307");
 //            int times = 0;
 //            while (times < 100) {
 //                Thread.sleep(5000);
 //                try {
 //                    String msg = k.getMessage(token, "2307", mobile);
-//                    System.out.println(msg);
 //                    break;
 //                } catch (Exception e) {
-//                    System.out.println("等待短信");
 //                }
 //                times++;
 //            }
-//            System.out.println("完成");
 //        } catch (Exception e) {
 //            e.printStackTrace();
 //        }

+ 0 - 3
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeCompanyServiceImpl.java

@@ -41,7 +41,6 @@ public class DataeyeCompanyServiceImpl extends ServiceImpl<DataeyeCompanyMapper,
         paramMap.put("thisTimes",(long)(new Date().getTime()/100));
         String sign = SignUtil.getDataeyeSign(paramMap);
         paramMap.put("sign",sign);
-        System.out.println(new Gson().toJson(paramMap));
         String response = HttpUtils.httpPostFormRequest("https://adx.dataeye.com/company/getCompanyInfo",paramMap,headerMap);
         ObjectMapper mapper = new ObjectMapper();
         mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
@@ -56,7 +55,6 @@ public class DataeyeCompanyServiceImpl extends ServiceImpl<DataeyeCompanyMapper,
         } catch (IOException e) {
             e.printStackTrace();
         }
-        System.out.println(response);
     }
 
 
@@ -64,7 +62,6 @@ public class DataeyeCompanyServiceImpl extends ServiceImpl<DataeyeCompanyMapper,
         DataeyeCompanyServiceImpl i = new DataeyeCompanyServiceImpl();
         i.getCompanyInfo(1);
 //        Date date = new Date(1582598505897L);
-//        System.out.println(DateUtils.formatDate(1582598505897L));
 
 
     }

+ 0 - 10
module-crawler/src/main/java/cn/com/ctop/crawler/modules/jiema/service/impl/KuaimiServiceImpl.java

@@ -8,7 +8,6 @@ public class KuaimiServiceImpl {
     public String kuaimiLogin() throws Exception {
         String result = HttpUtils.httpPostNoParamRequest(KUAIMI_API_URL + "?action=loginIn&name=xuzuoyun&password=heaven01");
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return result.split("\\|")[1];
         } else {
             throw new Exception();
@@ -18,9 +17,7 @@ public class KuaimiServiceImpl {
     public String getMobile(String token, String projectId) throws Exception {
         String url = KUAIMI_API_URL + "?action=getPhone&sid=" + projectId + "&token=" + token;
         String result = HttpUtils.httpPostNoParamRequest(url);
-        System.out.println(result);
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return result.split("\\|")[1];
         } else {
             throw new Exception();
@@ -31,7 +28,6 @@ public class KuaimiServiceImpl {
         String url = KUAIMI_API_URL + "?action=getMessage&sid=" + projectId + "&token=" + token + "&phone=" + phone;
         String result = HttpUtils.httpPostNoParamRequest(url);
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return result.split("\\|")[1].substring(6, 12);
         } else {
             throw new Exception();
@@ -42,7 +38,6 @@ public class KuaimiServiceImpl {
         String url = KUAIMI_API_URL + "?action=addBlacklist&sid=" + projectId + "&token=" + token + "&phone=" + phone;
         String result = HttpUtils.httpPostNoParamRequest(url);
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return result.split("\\|")[1];
         } else {
             throw new Exception();
@@ -53,7 +48,6 @@ public class KuaimiServiceImpl {
         String url = KUAIMI_API_URL + "?action=cancelRecv&sid=" + projectId + "&token=" + token + "&phone=" + phone;
         String result = HttpUtils.httpPostNoParamRequest(url);
         if (result != null && result.startsWith("1")) {
-            System.out.println(result);
             return result.split("\\|")[1];
         } else {
             throw new Exception();
@@ -64,21 +58,17 @@ public class KuaimiServiceImpl {
         KuaimiServiceImpl k = new KuaimiServiceImpl();
         try {
             String token = k.kuaimiLogin();
-            System.out.println(token);
             String mobile = k.getMobile(token, "2307");
             int times = 0;
             while (times < 100) {
                 Thread.sleep(5000);
                 try {
                     String msg = k.getMessage(token, "2307", mobile);
-                    System.out.println(msg);
                     break;
                 } catch (Exception e) {
-                    System.out.println("等待短信");
                 }
                 times++;
             }
-            System.out.println("完成");
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 0 - 1
module-crawler/src/main/java/cn/com/ctop/crawler/modules/jiema/service/impl/WumaServiceImpl.java

@@ -24,7 +24,6 @@ public class WumaServiceImpl {
         try {
             String token = k.login();
             String mobile = k.getMobile(token);
-            System.out.println(mobile);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 0 - 9
module-crawler/src/main/java/cn/com/ctop/crawler/modules/test/AppiumTest.java

@@ -208,7 +208,6 @@
 //                runTask(androidDriver, task, null);
 //            }
 //            androidDriver.quit();
-//            System.out.println("task success");
 //        } catch (Exception e) {
 //            e.printStackTrace();
 //        }
@@ -218,7 +217,6 @@
 //
 //    public void runTask(AndroidDriver androidDriver, AppiumTask appiumTask, WebElement loopElement) throws Exception {
 //        if (appiumTask != null) {
-//            System.out.println(new Gson().toJson(appiumTask));
 //            if (appiumTask.getWaitTime() != null && appiumTask.getWaitTime() > 0) {
 //                Thread.sleep(appiumTask.getWaitTime());
 //            }
@@ -286,7 +284,6 @@
 //                }
 //            } else if (appiumTask.getLoopType() != null && "loop".equals(appiumTask.getLoopType())) {
 //                while (isLoop) {
-//                    System.out.println("loop:" + isLoop);
 //                    if (appiumTask.getFindType() != null) {
 //                        List<WebElement> list = null;
 //                        if ("id".equals(appiumTask.getFindType())) {
@@ -375,7 +372,6 @@
 ////                            appiumTest.swipeToUp(androidDriver);
 ////                            Thread.sleep(5000);
 //////                            String text = androidDriver.findElementById("com.smile.gifmaker:id/label").getText();
-//////                            System.out.println(text);
 //////                            String title = text.split(":")[1].trim();
 ////
 //////                            if(title.startsWith("超级有趣的小游戏")){
@@ -393,7 +389,6 @@
 ////                                    Thread.sleep(5000);
 ////                                        List<WebElement> element1 = androidDriver.findElementsById("com.android.packageinstaller:id/ok_button");
 ////                                        if(element1 != null && element1.size() > 0){
-////                                            System.out.println(element1.get(0).getText());
 ////                                            element1.get(0).click();
 ////                                            break;
 ////                                        }
@@ -402,7 +397,6 @@
 ////                                        Thread.sleep(5000);
 ////                                        List<WebElement> element1 = androidDriver.findElementsById("com.android.packageinstaller:id/launch_button");
 ////                                        if(element1 != null && element1.size() > 0){
-////                                            System.out.println(element1.get(0).getText());
 ////                                            element1.get(0).click();
 ////                                            break;
 ////                                        }
@@ -425,7 +419,6 @@
 ////                                        Thread.sleep(2000);
 ////                                        appiumTest.swipeToUp(androidDriver);
 ////                                    }
-////                                    System.out.println("操作完成");
 ////                                }else {
 ////                                    androidDriver.findElementById("com.smile.gifmaker:id/back_btn").click();
 ////                                }
@@ -445,14 +438,12 @@
 ////                                //评论提交 com.smile.gifmaker:id/finish_button
 ////
 //////                            }else {
-//////                                System.out.println(title);
 //////                                androidDriver.findElementById("com.smile.gifmaker:id/back_btn").click();
 //////                            }
 ////
 ////
 //////                            Thread.sleep(5000);
 //////                            androidDriver.findElementById("com.smile.gifmaker:id/back_btn").click();
-//////                            System.out.println("广告坐标为:"+point.getX()+","+point.getY());
 ////                        }
 ////                    }
 ////                }

+ 0 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouController.java

@@ -38,7 +38,6 @@ public class KuaiShouController {
         requestJson.put("type", 2);
         requestJson.put("day_budget", 0L);
         Map<String, Object> stringObjectMap = kuaishouInterfaceService.campaignCreate(accessToken, advertiserId, requestJson);
-        System.err.println(JSON.toJSONString(stringObjectMap));
     }
 
     /**
@@ -72,7 +71,6 @@ public class KuaiShouController {
         targetJson.put("android_osv", 3);
         targetJson.put("network", 0);
         Map<String, Object> stringObjectMap = kuaishouInterfaceService.adUnitCreate(accessToken, advertiserId, requestJson);
-        System.err.println(JSON.toJSONString(stringObjectMap));
     }
 
 

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouConversionTypesController.java

@@ -68,7 +68,6 @@ public class KuaiShouConversionTypesController {
         Map<String, Object> resultMap = kuaishouInterfaceService.getDeepConversionInfos(accountId, token.getAccessToken());
         if ((Integer) resultMap.get("code") == 0) {
             result.setResult(resultMap);
-            System.err.println(result);
         }
         result.setSuccess(true);
 

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupCreateLogController.java

@@ -109,7 +109,6 @@ public class KuaiShouGroupCreateLogController {
         queryWrapper.orderByDesc("create_time");
         queryWrapper.last("limit 1");
         KuaiShouGroupCreateLog groupCreateLog = (KuaiShouGroupCreateLog) kuaiShouGroupCreateLogService.getObj(queryWrapper);
-        System.err.println(groupCreateLog);
 
         return groupCreateLog;
     }

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

@@ -493,7 +493,6 @@ public class KuaiShouUpdateServiceImpl implements IKuaiShouUpdateService {
             params.put("description", description);
             String result = HttpUtils.httpPostRequest(url, params, header);
             JSONObject resultJson = JSONObject.parseObject(result);
-            System.err.println("返回结果: " + resultJson);
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {

+ 0 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java

@@ -620,7 +620,6 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
 //                FileUtils.copyFile(scrFile, new File(savePath));
 //                webDriver.switchTo().frame(webDriver.findElement(By.tagName("iframe")));
 //                String result = ChaojiyingUtils.process(Base64Utils.imageToBase64(savePath));
-//                System.out.println(result);
 //                ((JavascriptExecutor) webDriver).executeScript("arguments[0].click();", webDriver.findElement(By.className("aq_icon_refresh")));
 //            }
             webDriver.get("https://b.e.kuaishou.com/#/home/profile");
@@ -691,7 +690,6 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
             bodys.put("userIds", userList);
             String securityUrl = "https://ad.e.kuaishou.com/rest/dsp/control-panel/creative/preview?kuaishou.ad.dsp_ph=" + ph;
             String html2 = HttpUtils2.httpPostRequest(securityUrl, bodys, headers);
-            System.out.println(html2);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -727,9 +725,7 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
 
 
             webDriver.get("https://ad.e.kuaishou.com/#/index");
-            System.out.println(webDriver.getPageSource());
             webDriver.get("https://ad.e.kuaishou.com/#/manage?campaignId=5012466&unitId=6577717&tab=creative");
-            System.out.println(webDriver.getPageSource());
             //获取Cookie并打印
             Set<org.openqa.selenium.Cookie> cookies = webDriver.manage().getCookies();
             Iterator iterator = cookies.iterator();
@@ -751,7 +747,6 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
                 HttpUtils2.cookieStore.addCookie(clientCookie);
             }
             String result = HttpUtils2.httpGetRequest("https://uc.e.kuaishou.com/rest/web/login?sid=kuaishou.ad.dsp&followUrl=https%3A%2F%2Fad.e.kuaishou.com%2F%23%2Findex");
-            System.out.println(result);
         } catch (Exception e) {
             e.printStackTrace();
         } finally {

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

@@ -9,10 +9,11 @@ import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAgentMapper
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAgentSumMapper;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.gson.Gson;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.http.client.CookieStore;
 import org.apache.http.impl.client.BasicCookieStore;
 import org.apache.http.impl.cookie.BasicClientCookie;
@@ -27,18 +28,18 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
 /**
  * 代理商日报
+ *
  * @author jeecg-boot
- * @date   2019-12-13
  * @version V1.0
+ * @date 2019-12-13
  */
+@Slf4j
 @Service
 public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouReportDailyAgentMapper, KuaishouReportDailyAgent> implements IKuaishouReportDailyAgentService {
     @Autowired
@@ -49,12 +50,13 @@ public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouRep
     private KuaishouAgentAccountMapper kuaishouAgentAccountMapper;
     @Value("${jeecg.path.chrome-driver}")
     private String chromeDriver;
+
     @Override
     public void replaceBatch(List<KuaishouReportDailyAgent> list) {
         kuaishouReportDailyAgentMapper.replaceBatch(list);
     }
 
-    public boolean loginAgent(){
+    public boolean loginAgent() {
         boolean loginStatus = false;
         System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
         String url = "https://agent.e.kuaishou.com";
@@ -104,10 +106,10 @@ public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouRep
                 HttpUtils2.cookieStore.addCookie(clientCookie);
             }
             loginStatus = true;
-        }catch (Exception e) {
+        } catch (Exception e) {
             e.printStackTrace();
             loginStatus = false;
-        }finally {
+        } finally {
             webDriver.manage().deleteAllCookies();
 //            webDriver.close();
             webDriver.quit();
@@ -115,38 +117,38 @@ public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouRep
         return loginStatus;
     }
 
-    public boolean getAccount(int currentPage){
+    public boolean getAccount(int currentPage) {
         boolean hasNextPage = false;
         try {
-            if(currentPage == 1){
-                if (!loginAgent()){
+            if (currentPage == 1) {
+                if (!loginAgent()) {
                     return hasNextPage;
                 }
             }
-            Map<String,String> headerMap = new HashMap<String,String>();
-            headerMap.put("Accept","application/json");
-            headerMap.put("Accept-Encoding","gzip, deflate, br");
-            headerMap.put("Accept-Language","zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2");
-            headerMap.put("Connection","keep-alive");
-            headerMap.put("Host","agent.e.kuaishou.com");
-            headerMap.put("Referer","https://agent.e.kuaishou.com/");
-            headerMap.put("Content-Type","application/json;charset=utf-8");
-            headerMap.put("User-Agent",HttpUtils2.USER_AGENT);
-            String postData = "{\"pageInfo\":{\"currentPage\":"+currentPage+",\"pageSize\":200,\"total\":1000},\"reviewStatus\":\"-1\",\"selectType\":1,\"selectValue\":\"\",\"createBeginTime\":0,\"createEndTime\":0}";
+            Map<String, String> headerMap = new HashMap<String, String>();
+            headerMap.put("Accept", "application/json");
+            headerMap.put("Accept-Encoding", "gzip, deflate, br");
+            headerMap.put("Accept-Language", "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2");
+            headerMap.put("Connection", "keep-alive");
+            headerMap.put("Host", "agent.e.kuaishou.com");
+            headerMap.put("Referer", "https://agent.e.kuaishou.com/");
+            headerMap.put("Content-Type", "application/json;charset=utf-8");
+            headerMap.put("User-Agent", HttpUtils2.USER_AGENT);
+            String postData = "{\"pageInfo\":{\"currentPage\":" + currentPage + ",\"pageSize\":200,\"total\":1000},\"reviewStatus\":\"-1\",\"selectType\":1,\"selectValue\":\"\",\"createBeginTime\":0,\"createEndTime\":0}";
             String listUrl = "https://agent.e.kuaishou.com/rest/dsp/agent/account/list";
-            String result = HttpUtils2.httpPostRequestTest(listUrl,postData,headerMap);
+            String result = HttpUtils2.httpPostRequestTest(listUrl, postData, headerMap);
             ObjectMapper mapper = new ObjectMapper();
             mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
             JsonNode resultNode = mapper.readTree(result);
             Integer code = resultNode.get("result").intValue();
-            if(code == 1) {
+            if (code == 1) {
                 Iterator<JsonNode> iterator1 = resultNode.get("adDspAccountList").elements();
                 int i = 0;
                 List<KuaishouAgentAccount> accountList = new ArrayList<>();
                 while (iterator1.hasNext()) {
                     hasNextPage = true;
                     JsonNode dataNode = iterator1.next();
-                    KuaishouAgentAccount agentAccount = mapper.readValue(dataNode.toString(),KuaishouAgentAccount.class);
+                    KuaishouAgentAccount agentAccount = mapper.readValue(dataNode.toString(), KuaishouAgentAccount.class);
                     agentAccount.setBalance(agentAccount.getBalance().divide(new BigDecimal(1000)));
                     agentAccount.setContractRebate(agentAccount.getContractRebate().divide(new BigDecimal(1000)));
                     agentAccount.setCreditBalance(agentAccount.getCreditBalance().divide(new BigDecimal(1000)));
@@ -159,48 +161,48 @@ public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouRep
                     agentAccount.setTotalBalance(agentAccount.getTotalBalance().divide(new BigDecimal(1000)));
                     accountList.add(agentAccount);
                 }
-                if (accountList != null && accountList.size() > 0){
+                if (accountList != null && accountList.size() > 0) {
                     kuaishouAgentAccountMapper.replaceBatch(accountList);
                 }
             }
 
-        }catch (Exception e){
+        } catch (Exception e) {
             e.printStackTrace();
         }
         return hasNextPage;
     }
 
-    public void getReport(String startDate,String endDate){
-        try{
-            if (!loginAgent()){
+    public void getReport(String startDate, String endDate) {
+        try {
+            if (!loginAgent()) {
                 return;
             }
             String currentDate = startDate;
-            Map<String,String> headerMap = new HashMap<String,String>();
-            headerMap.put("Accept","application/json");
-            headerMap.put("Accept-Encoding","gzip, deflate, br");
-            headerMap.put("Accept-Language","zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2");
-            headerMap.put("Connection","keep-alive");
-            headerMap.put("Host","agent.e.kuaishou.com");
-            headerMap.put("Referer","https://agent.e.kuaishou.com/");
-            headerMap.put("Content-Type","application/json;charset=utf-8");
-            headerMap.put("User-Agent",HttpUtils2.USER_AGENT);
-            while(DateUtils.compareDate(currentDate,endDate)<=0){
+            Map<String, String> headerMap = new HashMap<String, String>();
+            headerMap.put("Accept", "application/json");
+            headerMap.put("Accept-Encoding", "gzip, deflate, br");
+            headerMap.put("Accept-Language", "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2");
+            headerMap.put("Connection", "keep-alive");
+            headerMap.put("Host", "agent.e.kuaishou.com");
+            headerMap.put("Referer", "https://agent.e.kuaishou.com/");
+            headerMap.put("Content-Type", "application/json;charset=utf-8");
+            headerMap.put("User-Agent", HttpUtils2.USER_AGENT);
+            while (DateUtils.compareDate(currentDate, endDate) <= 0) {
                 //{"agentId":403756224,"startDate":"2020-03-05","endDate":"2020-03-05","sortKey":"","isAscending":false,"pageInfo":{"pageSize":19,"currentPage":1,"totalCount":100}}
                 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);
+                String postData = "{\"agentId\":403756224,\"startDate\":\"" + currentDate + "\",\"endDate\":\"" + currentDate + "\",\"isAscending\":false,\"pageInfo\":{\"pageSize\":19,\"currentPage\":1,\"totalCount\":999999}}";
+                String result = HttpUtils2.httpPostRequestTest(listUrl, postData, headerMap);
                 ObjectMapper mapper = new ObjectMapper();
                 JsonNode resultNode = mapper.readTree(result);
                 Integer code = resultNode.get("result").intValue();
-                if(code == 1){
+                if (code == 1) {
                     Iterator<JsonNode> iterator1 = resultNode.get("data").elements();
                     int i = 0;
                     List<KuaishouReportDailyAgent> reportList = new ArrayList<>();
-                    while (iterator1.hasNext()){
+                    while (iterator1.hasNext()) {
                         JsonNode dataNode = iterator1.next();
                         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-                        if(i == 0){
+                        if (i == 0) {
                             KuaishouReportDailyAgentSum kuaishouReportDailyAgentSum = new KuaishouReportDailyAgentSum();
                             kuaishouReportDailyAgentSum.setBalance(dataNode.get("totalBalanceDouble").decimalValue());
                             kuaishouReportDailyAgentSum.setConvertClickRate(dataNode.get("actionbarClickRatio").decimalValue());
@@ -218,10 +220,10 @@ public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouRep
                             kuaishouReportDailyAgentSum.setXianjinCost(dataNode.get("realChargedInYuan").decimalValue());
                             kuaishouReportDailyAgentSum.setXinyongCost(dataNode.get("creditRealChargedInYuan").decimalValue());
                             QueryWrapper<KuaishouReportDailyAgentSum> queryWrapper = new QueryWrapper<>();
-                            queryWrapper.eq("date",currentDate);
+                            queryWrapper.eq("date", currentDate);
                             kuaishouReportDailyAgentSumMapper.delete(queryWrapper);
                             kuaishouReportDailyAgentSumMapper.insert(kuaishouReportDailyAgentSum);
-                        }else {
+                        } else {
                             KuaishouReportDailyAgent kuaishouReportDailyAgent = new KuaishouReportDailyAgent();
                             kuaishouReportDailyAgent.setAccountId(dataNode.get("accountId").asInt());
                             kuaishouReportDailyAgent.setAdvertiserCreateTime(new Date(dataNode.get("createTime").asLong()));
@@ -246,12 +248,13 @@ public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouRep
                         }
                         i++;
                     }
-                    if(reportList != null && reportList.size() > 0){
+                    if (reportList != null && reportList.size() > 0) {
                         replaceBatch(reportList);
                     }
                 }
-                System.out.println("代理商日报"+currentDate+"入库完成");
-                currentDate = DateUtils.addDay(currentDate,1);
+
+                log.info("代理商日报:{}入库完成", currentDate);
+                currentDate = DateUtils.addDay(currentDate, 1);
             }
         } catch (Exception e) {
             e.printStackTrace();

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

@@ -26,6 +26,5 @@ public class KuaishouReportHourlyCampaignServiceImpl extends ServiceImpl<Kuaisho
             return;
         }
         List<String> getList = new ArrayList<>(list.size());
-        System.out.println(list.size());
     }
 }

+ 0 - 1
moudule-eureca/.mvn/wrapper/MavenWrapperDownloader.java

@@ -47,7 +47,6 @@ public class MavenWrapperDownloader {
     private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
 
     public static void main(String args[]) {
-        System.out.println("- Downloader started");
         File baseDirectory = new File(args[0]);
         System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());