Commit 2f2cfdbfc0ec4f947630e2a3cd5e27f81c7aed27

Authored by yiming
1 parent 936eec0b

改成云服务地址

src/main/java/com/example/demo/SaticScheduleTask.java
... ... @@ -45,6 +45,7 @@ public class SaticScheduleTask {
45 45 @Autowired
46 46 private Analysis analysis;
47 47  
  48 + private static DateTimeFormatter tdf=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
48 49  
49 50  
50 51  
... ... @@ -78,17 +79,14 @@ public class SaticScheduleTask {
78 79  
79 80  
80 81  
81   - void getArrivalInfos2() {
82   - logger.info("票务数据缓存加载: " + LocalDateTime.now());
  82 + void getArrivalInfos2(String date,String path) {
  83 + LocalDateTime now=LocalDateTime.parse(date,tdf);
  84 + logger.info("票务数据缓存加载: " + now);
83 85 try {
84   - LocalDateTime now=LocalDateTime.now();
85   - //测试
86   - DateTimeFormatter tdf=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
87   - now=LocalDateTime.parse("2021-11-19 00:00",tdf);
88 86 List<Map<String,List<Scheduling>>> result=contrast.getSchedulingS(now,1);
89 87 contrast.getSchedulingS=result.get(0);
90 88 contrast.getSchedulingSSell=result.get(1);
91   - List<File> fl= FileUtil.loopFiles("/home/oldFile/20211118COPY");
  89 + List<File> fl= FileUtil.loopFiles(path);
92 90 System.out.println(fl.size());
93 91 List<List<File>> subList=getSubList(100,fl);
94 92 if(!subList.isEmpty()){
... ... @@ -105,11 +103,17 @@ public class SaticScheduleTask {
105 103 }
106 104 });
107 105 }
  106 + logger.info("==============================="+now.minusDays(1)+"数据处理完成================================");
108 107 } catch (Exception e) {
109 108 e.printStackTrace();
110 109 }
111 110 }
112 111  
  112 + //@PostConstruct
  113 + void processingHistory(){
  114 + getArrivalInfos2("2022-11-22 00:00","/home/oldFile/20221121");
  115 + //getArrivalInfos2("2022-11-23 00:00","/home/oldFile/20221122");
  116 + }
113 117  
114 118 /**
115 119 * @Description: 用来计算数据库中的乘车记录
... ...
src/main/resources/application.properties
1 1 server.port=8088
2 2  
3   -spring.datasource.db1.jdbc-url=jdbc:mysql://10.10.200.121:3306/control?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
  3 +spring.datasource.db1.jdbc-url=jdbc:mysql://192.170.100.132:3306/control?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
4 4 spring.datasource.db1.username=ym
5 5 spring.datasource.db1.password=Ym(12345678)
6 6 spring.datasource.db1.driver-class-name=com.mysql.cj.jdbc.Driver
7 7 spring.datasource.db1.druid.test-on-borrow=true
8 8 spring.datasource.db1.druid.test-while-idle=true
9 9  
10   -spring.datasource.db2.jdbc-url=jdbc:mysql://10.10.150.122:3306/ms?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
  10 +spring.datasource.db2.jdbc-url=jdbc:mysql://192.170.100.63:3306/ms?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
11 11 spring.datasource.db2.username=ym
12 12 spring.datasource.db2.password=Ym(12345678)
13 13 spring.datasource.db2.driver-class-name=com.mysql.cj.jdbc.Driver
... ... @@ -26,7 +26,7 @@ ftp.root= /home/sftp
26 26 ftp.oldFile= /home/oldFile
27 27  
28 28  
29   -spring.kafka.bootstrap-servers=10.10.200.45:19092
  29 +spring.kafka.bootstrap-servers=192.170.100.129:9092
30 30 spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
31 31 spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
32 32 spring.kafka.producer.buffer-memory=33554432
... ...