From 978d819b2faf016983a1670a2297700fa2205da8 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期一, 29 四月 2024 16:19:19 +0800
Subject: [PATCH] 最新版本
---
server/visits/admin_timer/src/main/java/com/doumee/api/HkDeviceTimerController.java | 31 +
server/visits/admin_timer/src/main/resources/application.yml | 2
server/system_timer/src/main/resources/application.yml | 72 +++
server/visits/admin_timer/src/main/resources/bootstrap.yml | 36 +
server/visits/admin_timer/src/main/java/com/doumee/api/HkEmpowerTimerController.java | 84 +++
server/system_timer/src/main/resources/application-pro.yml | 54 ++
server/system_timer/src/main/java/com/doumee/jobs/service/TimerBizSevice.java | 39 +
server/system_timer/src/main/java/com/doumee/SystemTimerApplication.java | 26 +
server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzJob.java | 2
server/system_service/src/main/java/com/doumee/service/timer/QuartzJobService.java | 18
server/meeting/meeting_admin/src/main/java/com/doumee/api/CloudBookingsController.java | 2
server/system_timer/pom.xml | 93 ++++
server/system_timer/src/main/java/com/doumee/config/DecoderConfig.java | 46 ++
server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerJob.java | 34 +
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java | 6
server/system_timer/src/main/java/com/doumee/jobs/TimerJob.java | 4
server/system_timer/src/main/resources/META-INF/MANIFEST.MF | 3
server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java | 4
server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzRecord.java | 5
server/visits/admin_timer/src/main/java/com/doumee/api/HkUsersTimerController.java | 66 ++
server/visits/admin_timer/src/main/java/com/doumee/api/HkVisitTimerController.java | 60 ++
server/visits/dmvisit_admin/src/main/java/com/doumee/api/CloudCarsController.java | 3
server/visits/admin_timer/src/main/java/com/doumee/api/HkLogTimerController.java | 37 +
server/visits/pom.xml | 5
server/visits/admin_timer/pom.xml | 50 --
server/system_timer/src/main/java/com/doumee/jobs/PrintJob.java | 4
server/system_gateway/src/main/resources/bootstrap.yml | 2
server/visits/admin_timer/src/main/java/com/doumee/TimerApplication.java | 2
logs/myapp.log | 45 -
server/visits/admin_timer/src/main/java/com/doumee/api/HkParkTimerController.java | 44 +
server/system_timer/src/main/resources/banner.txt | 20
server/system_timer/src/main/resources/bootstrap.yml | 36 +
server/system_gateway/pom.xml | 1
/dev/null | 172 -------
server/system_timer/src/main/java/com/doumee/jobs/JobService.java | 4
server/system_timer/src/main/resources/application-test.yml | 81 +++
server/pom.xml | 1
server/system_timer/src/main/resources/application-dev.yml | 83 +++
server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerFegin.java | 31 +
server/visits/admin_timer/src/main/java/com/doumee/api/HkImageTimerController.java | 40 +
server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzLog.java | 4
41 files changed, 1,049 insertions(+), 303 deletions(-)
diff --git a/logs/myapp.log b/logs/myapp.log
index faddef6..55924bb 100644
--- a/logs/myapp.log
+++ b/logs/myapp.log
@@ -1,42 +1,3 @@
-2024-04-19 16:14:12,615 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 1772 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:14:12,647 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:14:12,663 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: devAntai
-2024-04-19 16:14:34,494 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 23804 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:14:34,503 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:14:34,504 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: devAntai
-2024-04-19 16:15:01,251 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 13076 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:15:01,255 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:15:01,256 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: devAntai
-2024-04-19 16:15:28,022 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 19768 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:15:28,026 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:15:28,027 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: devAntai
-2024-04-19 16:16:25,759 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 23908 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:16:25,767 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:16:25,768 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: devAntai
-2024-04-19 16:18:09,874 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 18852 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:18:09,880 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:18:09,880 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: devAntai
-2024-04-19 16:35:09,509 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 15056 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:35:09,516 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:35:09,517 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: devAntai
-2024-04-19 16:36:39,778 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 16368 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:36:39,782 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:36:39,783 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: devAntai
-2024-04-19 16:37:53,600 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 15172 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:37:53,608 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:37:53,608 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: dev
-2024-04-19 16:38:59,896 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 27264 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:38:59,903 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:38:59,904 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: dev
-2024-04-19 16:39:58,766 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 26420 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:39:58,771 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:39:58,771 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: dev
-2024-04-19 16:40:03,958 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 16488 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:40:03,962 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:40:03,963 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: dev
-2024-04-19 16:47:44,627 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 25280 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:47:44,635 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:47:44,636 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: dev
-2024-04-19 16:49:35,712 INFO [main] c.d.AdminApplication [StartupInfoLogger.java:55] Starting AdminApplication on DESKTOP-77EHGKJ with PID 24896 (D:\code\idea2023\git\dmvisit\server\dmvisit_admin\target\classes started by T14 in D:\code\idea2023\git\dmvisit)
-2024-04-19 16:49:35,720 DEBUG [main] c.d.AdminApplication [StartupInfoLogger.java:56] Running with Spring Boot v2.2.5.RELEASE, Spring v5.2.4.RELEASE
-2024-04-19 16:49:35,720 INFO [main] c.d.AdminApplication [SpringApplication.java:655] The following profiles are active: dev
+2024-04-29 13:47:55,448 INFO [main] c.d.TimerApplication [SpringApplication.java:652] The following profiles are active: dev
+2024-04-29 13:53:06,150 INFO [main] c.d.TimerApplication [SpringApplication.java:652] The following profiles are active: dev
+2024-04-29 14:12:01,421 INFO [main] c.d.TimerApplication [SpringApplication.java:652] The following profiles are active: dev
diff --git a/server/meeting/meeting_admin/src/main/java/com/doumee/api/cloud/CloudBookingsController.java b/server/meeting/meeting_admin/src/main/java/com/doumee/api/CloudBookingsController.java
similarity index 99%
rename from server/meeting/meeting_admin/src/main/java/com/doumee/api/cloud/CloudBookingsController.java
rename to server/meeting/meeting_admin/src/main/java/com/doumee/api/CloudBookingsController.java
index 17fdb9b..7ac3253 100644
--- a/server/meeting/meeting_admin/src/main/java/com/doumee/api/cloud/CloudBookingsController.java
+++ b/server/meeting/meeting_admin/src/main/java/com/doumee/api/CloudBookingsController.java
@@ -1,4 +1,4 @@
-package com.doumee.api.cloud;
+package com.doumee.api;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
diff --git a/server/pom.xml b/server/pom.xml
index 960bf01..badf30a 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -14,6 +14,7 @@
<module>meeting</module>
<module>system_service</module>
<module>visits</module>
+ <module>system_timer</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
diff --git a/server/system_gateway/pom.xml b/server/system_gateway/pom.xml
index 1a44c9c..969e452 100644
--- a/server/system_gateway/pom.xml
+++ b/server/system_gateway/pom.xml
@@ -26,6 +26,7 @@
</exclusion>
</exclusions>
</dependency>
+
<!-- <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
diff --git a/server/system_gateway/src/main/java/com/doumee/Main.java b/server/system_gateway/src/main/java/com/doumee/Main.java
deleted file mode 100644
index ada0d0d..0000000
--- a/server/system_gateway/src/main/java/com/doumee/Main.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.doumee;
-
-public class Main {
- public static void main(String[] args) {
- System.out.println("Hello world!");
- }
-}
\ No newline at end of file
diff --git a/server/system_gateway/src/main/resources/bootstrap.yml b/server/system_gateway/src/main/resources/bootstrap.yml
index e97a7ee..59e04cc 100644
--- a/server/system_gateway/src/main/resources/bootstrap.yml
+++ b/server/system_gateway/src/main/resources/bootstrap.yml
@@ -14,7 +14,7 @@
password: nacos
discovery:
server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
- namespace: dev_renkang
+ namespace: dmvisit
username: nacos
password: nacos
gateway:
diff --git a/server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzJob.java b/server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzJob.java
index a34ba07..ae69ccf 100644
--- a/server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzJob.java
+++ b/server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzJob.java
@@ -37,6 +37,8 @@
@Schema(description = "鎵ц鍙傛暟")
private String params;
+ @Schema(description = "妯″潡鍚嶇О")
+ private String module;
@Schema(description = "Cron琛ㄨ揪寮�")
private String cronExpres;
diff --git a/server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzLog.java b/server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzLog.java
index 4f0e552..ce37fbe 100644
--- a/server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzLog.java
+++ b/server/system_service/src/main/java/com/doumee/dao/timer/entity/QuartzLog.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -37,4 +38,7 @@
private Date createTime;
+ @Schema(description = "妯″潡鍚嶇О")
+ private String module;
+
}
\ No newline at end of file
diff --git a/server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java b/server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java
index c7eb54c..e0191a9 100644
--- a/server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java
+++ b/server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzManage.java
@@ -55,10 +55,12 @@
JobDetail jobDetail = JobBuilder.newJob(QuartzRecord.class)
.withIdentity(getJobKey(quartzJob.getId())).build() ;
+
// 鏋勫缓Cron璋冨害鍣�
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder
.cronSchedule(quartzJob.getCronExpres())
.withMisfireHandlingInstructionDoNothing() ;
+
// 浠诲姟瑙﹀彂鍣�
CronTrigger trigger = TriggerBuilder.newTrigger()
.withIdentity(getTriggerKey(quartzJob.getId()))
@@ -66,7 +68,7 @@
jobDetail.getJobDataMap().put(QuartzJob.JOB_PARAM_KEY,quartzJob);
scheduler.scheduleJob(jobDetail,trigger) ;
// 鐘舵�佹牎楠�
- checkStop(quartzJob) ;
+// checkStop(quartzJob) ;
} catch (SchedulerException e){
throw new RuntimeException("createJob Fail",e) ;
}
diff --git a/server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzRecord.java b/server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzRecord.java
index d88edb1..bdc0740 100644
--- a/server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzRecord.java
+++ b/server/system_service/src/main/java/com/doumee/dao/timer/scheduler/QuartzRecord.java
@@ -32,10 +32,11 @@
try {
// 鍔犺浇骞舵墽琛�
Object target = SpringContextUtil.getBean(quartzJob.getBeanName());
- Method method = target.getClass().getDeclaredMethod("run", String.class);
- method.invoke(target, quartzJob.getParams());
+ Method method = target.getClass().getDeclaredMethod("run", String.class,String.class);
+ method.invoke(target, quartzJob.getParams(),quartzJob.getModule());
long executeTime = System.currentTimeMillis() - beginTime;
quartzLog.setTimes((int)executeTime);
+ quartzLog.setModule(quartzJob.getModule());
quartzLog.setState(LogState.LOG_SUS.getStatus());
} catch (Exception e){
// 寮傚父淇℃伅
diff --git a/server/system_service/src/main/java/com/doumee/service/timer/QuartzJobService.java b/server/system_service/src/main/java/com/doumee/service/timer/QuartzJobService.java
index a426c60..0f894b1 100644
--- a/server/system_service/src/main/java/com/doumee/service/timer/QuartzJobService.java
+++ b/server/system_service/src/main/java/com/doumee/service/timer/QuartzJobService.java
@@ -27,24 +27,6 @@
private QuartzManage quartzManage;
/**
- * 鍒濆鍖栧姞杞藉畾鏃朵换鍔�
- */
- @PostConstruct
- public void init () {
- LambdaQueryWrapper<QuartzJob> queryWrapper = new LambdaQueryWrapper<>() ;
- queryWrapper.in(QuartzJob::getState, JobState.JOB_RUN.getStatus(),JobState.JOB_STOP.getStatus());
- List<QuartzJob> jobList = quartzJobMapper.selectList(queryWrapper);
- jobList.forEach(quartzJob -> {
- CronTrigger cronTrigger = quartzManage.getCronTrigger(quartzJob.getId()) ;
- if (Objects.isNull(cronTrigger)){
- quartzManage.createJob(quartzJob);
- } else {
- quartzManage.updateJob(quartzJob);
- }
- });
- }
-
- /**
* 浠诲姟涓婚敭鏌ヨ
*/
public QuartzJob getById(Integer id) {
diff --git a/server/system_timer/pom.xml b/server/system_timer/pom.xml
new file mode 100644
index 0000000..3254660
--- /dev/null
+++ b/server/system_timer/pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.doumee</groupId>
+ <artifactId>dmvisit</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>system_timer</artifactId>
+
+ <properties>
+ <maven.compiler.source>8</maven.compiler.source>
+ <maven.compiler.target>8</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-gateway</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.doumee</groupId>
+ <artifactId>system_service</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ <!-- <dependency>
+ <groupId>com.alibaba.nacos</groupId>
+ <artifactId>nacos-client</artifactId>
+ <version>1.1.0</version>
+ </dependency>-->
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-openfeign</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-dependencies</artifactId>
+ <version>2.3.12.RELEASE</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.alibaba.cloud</groupId>
+ <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.alibaba.cloud</groupId>
+ <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <finalName>system_timer</finalName>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <configuration>
+ <fork>true</fork>
+ <mainClass>com.doumee.SystemTimerApplication</mainClass>
+ <layout>ZIP</layout>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!--<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>-->
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
diff --git a/server/system_timer/src/main/java/com/doumee/SystemTimerApplication.java b/server/system_timer/src/main/java/com/doumee/SystemTimerApplication.java
new file mode 100644
index 0000000..f403267
--- /dev/null
+++ b/server/system_timer/src/main/java/com/doumee/SystemTimerApplication.java
@@ -0,0 +1,26 @@
+package com.doumee;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.ApplicationContext;
+import org.springframework.scheduling.annotation.EnableAsync;
+
+/**
+ * 鍚姩绫�
+ * @author Eva.Caesar Liu
+ * @date 2023/03/21 14:49
+ */
+@EnableAsync
+@SpringBootApplication
+@EnableDiscoveryClient
+@MapperScan("com.doumee.dao.*")
+@EnableFeignClients(basePackages = "com.doumee.jobs")
+public class SystemTimerApplication {
+ public static void main(String[] args) {
+ ApplicationContext context = SpringApplication.run(SystemTimerApplication.class);
+ context.getEnvironment();
+ }
+}
diff --git a/server/system_timer/src/main/java/com/doumee/config/DecoderConfig.java b/server/system_timer/src/main/java/com/doumee/config/DecoderConfig.java
new file mode 100644
index 0000000..7c8215a
--- /dev/null
+++ b/server/system_timer/src/main/java/com/doumee/config/DecoderConfig.java
@@ -0,0 +1,46 @@
+package com.doumee.config;
+import feign.codec.Decoder;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.ObjectFactory;
+import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
+import org.springframework.cloud.openfeign.support.ResponseEntityDecoder;
+import org.springframework.cloud.openfeign.support.SpringDecoder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.MediaType;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Author: lizhi
+ * Date: 2022-02-17
+ * Describe: 瑙e喅 HttpMessageConverters Bean鏈敞鍐岄棶棰�
+ */
+@Configuration
+public class DecoderConfig {
+
+ @Bean
+ public Decoder feignDecoder() {
+ return new ResponseEntityDecoder(new SpringDecoder(feignHttpMessageConverter()));
+ }
+
+ public ObjectFactory<HttpMessageConverters> feignHttpMessageConverter() {
+ final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(new GateWayMappingJackson2HttpMessageConverter());
+ return new ObjectFactory<HttpMessageConverters>() {
+ @Override
+ public HttpMessageConverters getObject() throws BeansException {
+ return httpMessageConverters;
+ }
+ };
+ }
+
+ public class GateWayMappingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter {
+ GateWayMappingJackson2HttpMessageConverter(){
+ List<MediaType> mediaTypes = new ArrayList<>();
+ mediaTypes.add(MediaType.valueOf(MediaType.TEXT_HTML_VALUE + ";charset=UTF-8"));
+ setSupportedMediaTypes(mediaTypes);
+ }
+ }
+}
\ No newline at end of file
diff --git a/server/system_service/src/main/java/com/doumee/dao/timer/job/JobService.java b/server/system_timer/src/main/java/com/doumee/jobs/JobService.java
similarity index 60%
rename from server/system_service/src/main/java/com/doumee/dao/timer/job/JobService.java
rename to server/system_timer/src/main/java/com/doumee/jobs/JobService.java
index 1a2c97e..1a4beab 100644
--- a/server/system_service/src/main/java/com/doumee/dao/timer/job/JobService.java
+++ b/server/system_timer/src/main/java/com/doumee/jobs/JobService.java
@@ -1,4 +1,4 @@
-package com.doumee.dao.timer.job;
+package com.doumee.jobs;
/**
* @author 鍏紬鍙�:鐭ヤ簡涓�绗�
@@ -6,6 +6,6 @@
*/
public interface JobService {
- void run(String params);
+ void run(String params,String module);
}
diff --git a/server/system_service/src/main/java/com/doumee/dao/timer/job/PrintJob.java b/server/system_timer/src/main/java/com/doumee/jobs/PrintJob.java
similarity index 84%
rename from server/system_service/src/main/java/com/doumee/dao/timer/job/PrintJob.java
rename to server/system_timer/src/main/java/com/doumee/jobs/PrintJob.java
index 5f86449..df1910f 100644
--- a/server/system_service/src/main/java/com/doumee/dao/timer/job/PrintJob.java
+++ b/server/system_timer/src/main/java/com/doumee/jobs/PrintJob.java
@@ -1,4 +1,4 @@
-package com.doumee.dao.timer.job;
+package com.doumee.jobs;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -14,7 +14,7 @@
private static final Logger log = LoggerFactory.getLogger(PrintJob.class);
@Override
- public void run(String params) {
+ public void run(String params,String module) {
log.info("\n ======== \n print-job-params:{} \n ========",params);
}
}
diff --git a/server/system_service/src/main/java/com/doumee/dao/timer/job/TimerJob.java b/server/system_timer/src/main/java/com/doumee/jobs/TimerJob.java
similarity index 89%
rename from server/system_service/src/main/java/com/doumee/dao/timer/job/TimerJob.java
rename to server/system_timer/src/main/java/com/doumee/jobs/TimerJob.java
index 0dec872..98cdd3b 100644
--- a/server/system_service/src/main/java/com/doumee/dao/timer/job/TimerJob.java
+++ b/server/system_timer/src/main/java/com/doumee/jobs/TimerJob.java
@@ -1,4 +1,4 @@
-package com.doumee.dao.timer.job;
+package com.doumee.jobs;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -18,7 +18,7 @@
private static final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") ;
@Override
- public void run(String params) {
+ public void run(String params,String module) {
log.info("\n ======== \n timer-job-params:{} \n ========",params);
log.info("time-now:{}",format.format(new Date()));
}
diff --git a/server/system_timer/src/main/java/com/doumee/jobs/service/TimerBizSevice.java b/server/system_timer/src/main/java/com/doumee/jobs/service/TimerBizSevice.java
new file mode 100644
index 0000000..c427e2a
--- /dev/null
+++ b/server/system_timer/src/main/java/com/doumee/jobs/service/TimerBizSevice.java
@@ -0,0 +1,39 @@
+package com.doumee.jobs.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.doumee.dao.timer.entity.JobState;
+import com.doumee.dao.timer.entity.QuartzJob;
+import com.doumee.dao.timer.mapper.QuartzJobMapper;
+import com.doumee.dao.timer.scheduler.QuartzManage;
+import org.quartz.CronTrigger;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Objects;
+@Service
+public class TimerBizSevice {
+ @Resource
+ private QuartzJobMapper quartzJobMapper ;
+ @Resource
+ private QuartzManage quartzManage;
+ /**
+ * 鍒濆鍖栧姞杞藉畾鏃朵换鍔�
+ */
+ @PostConstruct
+ public void init () {
+ LambdaQueryWrapper<QuartzJob> queryWrapper = new LambdaQueryWrapper<>() ;
+ queryWrapper.in(QuartzJob::getState, JobState.JOB_RUN.getStatus(),JobState.JOB_STOP.getStatus());
+ List<QuartzJob> jobList = quartzJobMapper.selectList(queryWrapper);
+ jobList.forEach(quartzJob -> {
+ CronTrigger cronTrigger = quartzManage.getCronTrigger(quartzJob.getId()) ;
+ if (Objects.isNull(cronTrigger)){
+ quartzManage.createJob(quartzJob);
+ } else {
+ quartzManage.updateJob(quartzJob);
+ }
+ });
+ }
+
+}
diff --git a/server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerFegin.java b/server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerFegin.java
new file mode 100644
index 0000000..0908f41
--- /dev/null
+++ b/server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerFegin.java
@@ -0,0 +1,31 @@
+package com.doumee.jobs.visits;
+
+import com.doumee.core.model.ApiResponse;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+
+/**
+ * @author 鍏紬鍙�:鐭ヤ簡涓�绗�
+ * @since 2023-07-26 11:44
+ */
+@Component("visitEmpowerJob")
+@FeignClient(value = "visitsTimer")
+public interface EmpowerFegin {
+
+ @ApiOperation("寮�鍚畾鏃舵煡璇汉鍛樿澶囨巿鏉冪粨鏋�")
+ @GetMapping("/timer/empower/syncEmpowerDetailData")
+ public ApiResponse syncEmpowerDetailData();
+ @ApiOperation("寮�鍚畾鏃舵煡璇汉鍛樿澶囨巿鏉冧笅杞借繘搴�")
+ @GetMapping("/timer/empower/syncEmpowerResultData")
+ public ApiResponse syncEmpowerResultData() ;
+
+ @ApiOperation("寮�鍚畾鏃堕噸鏂颁笅鍙戝け璐ョ殑鎺堟潈鏁版嵁")
+ @GetMapping("/timer/empower/syncEmpowerFailData")
+ public ApiResponse syncEmpowerFailData();
+
+ @ApiOperation("寮�鍚畾鏃跺埛鏂颁汉鍛樿澶囨巿鏉�")
+ @GetMapping("/timer/empower/syncEmpowerData")
+ public ApiResponse syncEmpowerData();
+}
diff --git a/server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerJob.java b/server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerJob.java
new file mode 100644
index 0000000..e5f13be
--- /dev/null
+++ b/server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerJob.java
@@ -0,0 +1,34 @@
+package com.doumee.jobs.visits;
+
+import com.doumee.jobs.JobService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.lang.reflect.Method;
+
+/**
+ * @author 鍏紬鍙�:鐭ヤ簡涓�绗�
+ * @since 2023-07-26 11:44
+ */
+@Component("visitEmpowerJob")
+public class EmpowerJob implements JobService {
+ @Autowired
+ private EmpowerFegin fegin;
+ private static final Logger log = LoggerFactory.getLogger(EmpowerJob.class);
+
+ @Override
+ public void run(String params,String module) {
+ Method method = null;
+ try {
+ method = fegin.getClass().getDeclaredMethod(module);
+ method.invoke(fegin);
+ log.info("\n ======== 瀹氭椂浠诲姟宸叉墽琛岋細visitEmpowerJob.========"+module);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+}
diff --git a/server/system_timer/src/main/resources/META-INF/MANIFEST.MF b/server/system_timer/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..1be8b70
--- /dev/null
+++ b/server/system_timer/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: com.doumee.SystemTimerApplication
+
diff --git a/server/system_timer/src/main/resources/application-dev.yml b/server/system_timer/src/main/resources/application-dev.yml
new file mode 100644
index 0000000..fcf49af
--- /dev/null
+++ b/server/system_timer/src/main/resources/application-dev.yml
@@ -0,0 +1,83 @@
+spring:
+ # 鏁版嵁婧愰厤缃�
+ datasource:
+ url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+ username: doumee
+ password: rtjgfEr@&0c0m
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ type: com.alibaba.druid.pool.DruidDataSource
+ redis:
+ # database: 0
+ host: 127.0.0.1
+ port: 6379
+ password:
+ timeout: 5000 # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
+ jackson:
+ time-zone: GMT+8
+ date-format: yyyy-MM-dd HH:mm:ss
+
+#rocketmq:
+# namesrvAddr: rmq-cn-pe335rcnn06.cn-shanghai.rmq.aliyuncs.com:8080
+# groupId: GID-wakatest
+# topic: waka-test
+# username: 4derRb4Sw5EkqUMI
+# password: v50N97wf4av8Q8I4
+
+#knife4j:
+# enable: true
+# basic:
+# enable: true
+# username: admin
+# password: 111111
+
+debug_model: true
+
+########################鍚屾鏁版嵁妯″紡 ########################
+data-sync:
+ org-user-data-origin: 1 #缁勭粐鏁版嵁 0鑷缓 2浠ユ捣搴蜂负涓� 1鍗庢櫉ERP绯荤粺
+ visitor-data-origin: 1 #璁垮鏁版嵁 0鑷缓 2浠ユ捣搴蜂负涓� 1鍗庢櫉ERP绯荤粺
+ need-deal-img: true #鏄惁闇�瑕佸鐞嗗浘鐗囨暟鎹�
+
+
+# Swagger閰嶇疆
+swagger:
+ host: 127.0.0.1
+ title: ${project.name}鎺ュ彛鏂囨。
+ description: ${project.name}鎺ュ彛鏂囨。
+ enabled: true
+ context-path:
+ # 绂佺敤swagger鏃剁殑閲嶅畾鍚戝湴鍧�
+ redirect-uri: /
+
+########################寰俊鏀粯鐩稿叧閰嶇疆########################
+wx:
+ pay:
+ appId: wxfab6da18632e28de
+ appSecret: 4ee3b22afa90287834319fc3c1635271
+ mchId: 1229817002
+ mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM
+ notifyUrl: https://dmtest.ahapp.net/smartmeeting_interface/web/api/wxPayNotify
+ keyPath: /usr/local/apiclient_cert.p12
+
+tencent:
+ map:
+ remoteHost: https://apis.map.qq.com
+ appKey: 3AYBZ-I5R3V-2BVP3-UWBDQ-ETBM5-B2BBQ
+
+
+
+des_pwd: 123456SDFKDJF
+
+## MQTT##
+mqtt:
+ host: tcp://192.168.10.198:1883
+ userName: root
+ passWord: 123456
+ qos: 1
+ clientId: ClientId_local #ClientId_local蹇呴』鍞竴 姣斿浣犲凡缁忓畾浜嗗彨ABC 閭d綘灏变竴鐩村彨ABC 鍏朵粬鍦版柟灏变笉瑕佷娇鐢ˋBC浜�
+ timeout: 10
+ keepalive: 20
+ topic1: A/pick/warn/# #绗﹀彿鏄唬琛ㄦ暣涓獁arn涓嬮潰鐨勫叏閮ㄥ瓙涓婚 娌℃湁鐞嗚В鐨勮瘽 鍙互鐧惧害浠旂粏鐞嗚В涓�涓�
+ topic2: A/cmd/resp
+ topic3: ABCF
+ topic4: ABCH
diff --git a/server/system_timer/src/main/resources/application-pro.yml b/server/system_timer/src/main/resources/application-pro.yml
new file mode 100644
index 0000000..820aa2f
--- /dev/null
+++ b/server/system_timer/src/main/resources/application-pro.yml
@@ -0,0 +1,54 @@
+spring:
+ # 鏁版嵁婧愰厤缃�
+ datasource:
+ url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+ username: doumee
+ password: rtjgfEr@&0c0m
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ type: com.alibaba.druid.pool.DruidDataSource
+
+ redis:
+ # database: 0
+ host: 127.0.0.1
+ port: 6379
+ password:
+ timeout: 5000 # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
+#knife4j:
+# enable: true
+# basic:
+# enable: true
+# username: admin
+# password: doumee@168.com
+
+debug_model: true
+
+captcha_check: false
+
+# Swagger閰嶇疆
+swagger:
+ host:
+ title: ${project.name}鎺ュ彛鏂囨。
+ description: ${project.name}鎺ュ彛鏂囨。
+ enabled: true
+ # 绂佺敤swagger鏃剁殑閲嶅畾鍚戝湴鍧�
+ redirect-uri: /
+
+
+########################寰俊鏀粯鐩稿叧閰嶇疆########################
+wx:
+ pay:
+ appId: wxfab6da18632e28de
+ appSecret: 4ee3b22afa90287834319fc3c1635271
+ mchId: 1229817002
+ mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM
+ notifyUrl: https://dmtest.ahapp.net/smartmeeting_interface/web/api/wxPayNotify
+ keyPath: /usr/local/apiclient_cert.p12
+
+tencent:
+ map:
+ remoteHost: https://apis.map.qq.com
+ appKey: 3AYBZ-I5R3V-2BVP3-UWBDQ-ETBM5-B2BBQ
+
+
+
+des_pwd: 123456SDFKDJF
\ No newline at end of file
diff --git a/server/system_timer/src/main/resources/application-test.yml b/server/system_timer/src/main/resources/application-test.yml
new file mode 100644
index 0000000..03700b7
--- /dev/null
+++ b/server/system_timer/src/main/resources/application-test.yml
@@ -0,0 +1,81 @@
+spring:
+ # 鏁版嵁婧愰厤缃�
+ datasource:
+ url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+ username: doumee
+ password: rtjgfEr@&0c0m
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ type: com.alibaba.druid.pool.DruidDataSource
+
+ jackson:
+ time-zone: GMT+8
+ date-format: yyyy-MM-dd HH:mm:ss
+ redis:
+ # database: 0
+ host: 127.0.0.1
+ port: 6379
+ password:
+ timeout: 5000 # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
+#rocketmq:
+# namesrvAddr: rmq-cn-pe335rcnn06.cn-shanghai.rmq.aliyuncs.com:8080
+# groupId: GID-wakatest
+# topic: waka-test
+# username: 4derRb4Sw5EkqUMI
+# password: v50N97wf4av8Q8I4
+
+#knife4j:
+# enable: true
+# basic:
+# enable: true
+# username: admin
+# password: 111111
+
+debug_model: true
+
+# Swagger閰嶇疆
+swagger:
+ host: dmtest.ahapp.net
+ title: ${project.name}鎺ュ彛鏂囨。
+ description: ${project.name}鎺ュ彛鏂囨。
+ enabled: true
+ context-path: /erp_api
+ # 绂佺敤swagger鏃剁殑閲嶅畾鍚戝湴鍧�
+ redirect-uri: /
+
+########################鍚屾鏁版嵁妯″紡 ########################
+data-sync:
+ org-user-data-origin: 1 #缁勭粐鏁版嵁 0鑷缓 2浠ユ捣搴蜂负涓� 1鍗庢櫉ERP绯荤粺
+ visitor-data-origin: 1 #璁垮鏁版嵁 0鑷缓 2浠ユ捣搴蜂负涓� 1鍗庢櫉ERP绯荤粺
+ need-deal-img: true #鏄惁闇�瑕佸鐞嗗浘鐗囨暟鎹�
+
+########################寰俊鏀粯鐩稿叧閰嶇疆########################
+wx:
+ pay:
+ appId: wxfab6da18632e28de
+ appSecret: 4ee3b22afa90287834319fc3c1635271
+ mchId: 1229817002
+ mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM
+ notifyUrl: https://dmtest.ahapp.net/smartmeeting_interface/web/api/wxPayNotify
+ keyPath: /usr/local/apiclient_cert.p12
+
+tencent:
+ map:
+ remoteHost: https://apis.map.qq.com
+ appKey: 3AYBZ-I5R3V-2BVP3-UWBDQ-ETBM5-B2BBQ
+
+
+des_pwd: 123456SDFKDJF
+
+## MQTT##
+mqtt:
+ host: tcp://192.168.10.198:1883
+ userName: root
+ passWord: 123456
+ qos: 1
+ clientId: ClientId_local #ClientId_local蹇呴』鍞竴 姣斿浣犲凡缁忓畾浜嗗彨ABC 閭d綘灏变竴鐩村彨ABC 鍏朵粬鍦版柟灏变笉瑕佷娇鐢ˋBC浜�
+ timeout: 10
+ keepalive: 20
+ topic1: A/pick/warn/# #绗﹀彿鏄唬琛ㄦ暣涓獁arn涓嬮潰鐨勫叏閮ㄥ瓙涓婚 娌℃湁鐞嗚В鐨勮瘽 鍙互鐧惧害浠旂粏鐞嗚В涓�涓�
+ topic2: A/cmd/resp
+ topic3: ABCF
+ topic4: ABCH
diff --git a/server/system_timer/src/main/resources/application.yml b/server/system_timer/src/main/resources/application.yml
new file mode 100644
index 0000000..fac150d
--- /dev/null
+++ b/server/system_timer/src/main/resources/application.yml
@@ -0,0 +1,72 @@
+# 椤圭洰淇℃伅閰嶇疆
+project:
+ name: 瀹氭椂浠诲姟鏈嶅姟
+ version: 1.0.0
+ env: development
+# env: production
+
+
+spring:
+ application:
+ name: system_timer
+ profiles:
+ active: dev
+
+ # JSON杩斿洖閰嶇疆
+ jackson:
+ # 榛樿鏃跺尯
+ time-zone: GMT+8
+ # 榛樿鏃ユ湡鏍煎紡鍖�
+ date-format: yyyy-MM-dd HH:mm:ss
+ servlet:
+ multipart:
+ max-file-size: 200MB
+ max-request-size: 200MB
+ enabled: true
+ main:
+ allow-circular-references: true
+ web-application-type: reactive
+# MyBatis閰嶇疆
+mybatis-plus:
+ mapper-locations: classpath*:/mappers/**/*.xml
+ configuration:
+ map-underscore-to-camel-case: true
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+# 缂撳瓨鍐呭璁剧疆
+cache:
+ session:
+ # 浼氳瘽杩囨湡鏃堕暱(s)
+ expire: 18000
+ captcha:
+ # 楠岃瘉鐮佽繃鏈熸椂闀�(s)
+ expire: 300
+
+# 璺熻釜鏃ュ織
+trace:
+ # 寮�鍚櫤鑳借窡韪ā寮�
+ smart: true
+ # 鎺掗櫎璺熻釜鐨刄RL姝e垯
+ exclude-patterns: .+/list[a-zA-Z0-9\-\_]*$, .+/tree[a-zA-Z0-9\-\_]*$, .+/page[a-zA-Z0-9\-\_]*$, .+/all[a-zA-Z0-9\-\_]*$, /swagger-resources.*
+
+# 鏃ュ織閰嶇疆
+logback:
+ level: INFO
+ appender: ${project.env}
+# dao灞傜殑鏃ュ織璁剧疆涓篸ebug锛屾柟渚挎煡鐪媠ql
+logging:
+ level:
+ com.doumee.dao: debug
+
+
+# WEB鏈嶅姟鍣ㄩ厤缃�
+server:
+ compression:
+ enabled: true
+ mime-types: application/json
+ port: 10010
+ tomcat:
+ max-swallow-size: -1
+ servlet:
+ session:
+ timeout: PT3H #琛ㄧず12灏忔椂
diff --git a/server/system_timer/src/main/resources/banner.txt b/server/system_timer/src/main/resources/banner.txt
new file mode 100644
index 0000000..e6519fd
--- /dev/null
+++ b/server/system_timer/src/main/resources/banner.txt
@@ -0,0 +1,20 @@
+
+${AnsiColor.BLUE}
+================================================================================
+
+ 娆㈣繋浣跨敤璞嗙背妗嗘灦锛堝崟搴旂敤鐗堬級
+ Version :: 1.0
+
+ 鈻堚枅鈻堚枅鈻堚枅鈻堚枅 鈻堚枅 鈻堚枅
+ 鈻戔枅鈻堚枒鈻戔枒鈻戔枒 鈻堚枅 鈻戔枅鈻堚枒鈻堚枅 鈻堚枅 鈻堚枅
+ 鈻戔枅鈻� 鈻戔枒鈻堚枅 鈻戔枅鈻� 鈻戔枒鈻堚枅 鈻堚枅 鈻戔枒鈻堚枅
+ 鈻戔枅鈻� 鈻戔枅鈻� 鈻戔枅鈻� 鈻戔枒鈻堚枅鈻堚枅 鈻戔枒鈻堚枅
+ 鈻戔枅鈻� 鈻戔枅鈻� 鈻戔枅鈻� 鈻戔枒鈻堚枅 鈻戔枒鈻堚枅
+ 鈻戔枅鈻� 鈻堚枅 鈻戔枅鈻� 鈻戔枅鈻� 鈻戔枅鈻�
+ 鈻戔枅鈻堚枅鈻堚枅鈻堚枅鈻堚枒 鈻戔枅鈻� 鈻戔枅鈻� 鈻戔枅鈻�
+ 鈻戔枒鈻戔枒鈻戔枒鈻戔枒 鈻戔枒 鈻戔枒 鈻戔枒
+
+ 鍚姩绔彛: ${server.port} 鍚姩鐜: ${project.env} 鏃ュ織绛夌骇: ${logback.level} 鍚敤Swagger: ${swagger.enabled}
+
+================================================================================
+
diff --git a/server/system_timer/src/main/resources/bootstrap.yml b/server/system_timer/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..c75d94f
--- /dev/null
+++ b/server/system_timer/src/main/resources/bootstrap.yml
@@ -0,0 +1,36 @@
+spring:
+ application:
+ name: system-timer
+ # 瀹夊叏閰嶇疆
+ security:
+ # 楠岀鍏挜鍦板潃
+ oauth2:
+ authorizationserver:
+ token-uri: https://
+ cloud:
+ loadbalancer:
+ enabled: true
+ nacos:
+ # 浣跨敤Nacos璐熻浇绛栫暐锛屽紑鍙戠幆澧冨彲浠ュ埄鐢ㄥ氨杩戣闂満鍒跺畾鍚戣闂紝鍚姩鍙傛暟濡備笅锛�
+ # -Dspring.cloud.nacos.discovery.cluster-name=鑷畾涔�
+ enabled: true
+ cache:
+ # 鏆傛椂鍏抽棴缂撳瓨
+ enabled: false
+ nacos:
+ server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
+ username: nacos
+ password: nacos
+ # config:
+ # server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
+ # namespace: dmvisit
+ # username: nacos
+ # password: nacos
+ # file-extension: yaml
+ # group: dev
+ # data-id: com.doumee.meeting.admin
+ discovery:
+ server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
+ namespace: dmvisit
+ username: nacos
+ password: nacos
\ No newline at end of file
diff --git a/server/visits/admin_timer/pom.xml b/server/visits/admin_timer/pom.xml
index a9229c8..191358f 100644
--- a/server/visits/admin_timer/pom.xml
+++ b/server/visits/admin_timer/pom.xml
@@ -24,55 +24,7 @@
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
- <!--
- <build>
- <finalName>smartmeeting-admin</finalName>
- <pluginManagement><!– lock down plugins versions to avoid using Maven
- defaults (may be moved to parent pom) –>
- <plugins>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <version>3.1.0</version>
- </plugin>
- <!– see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging –>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.0.2</version>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.0</version>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.22.1</version>
- </plugin>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>3.2.2</version>
- <configuration>
- <webResources>
- <resource>
- <directory>${project.basedir}/../lib</directory>
- <targetPath>WEB-INF/lib/</targetPath>
- <includes>
- <include>*.jar</include>
- </includes>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-install-plugin</artifactId>
- <version>2.5.2</version>
- </plugin>
- <plugin>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>2.8.2</version>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>-->
+
<build>
<finalName>admin_timer</finalName>
<resources>
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/Main.java b/server/visits/admin_timer/src/main/java/com/doumee/Main.java
deleted file mode 100644
index ada0d0d..0000000
--- a/server/visits/admin_timer/src/main/java/com/doumee/Main.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.doumee;
-
-public class Main {
- public static void main(String[] args) {
- System.out.println("Hello world!");
- }
-}
\ No newline at end of file
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/TimerApplication.java b/server/visits/admin_timer/src/main/java/com/doumee/TimerApplication.java
index ac450ce..5dd32ad 100644
--- a/server/visits/admin_timer/src/main/java/com/doumee/TimerApplication.java
+++ b/server/visits/admin_timer/src/main/java/com/doumee/TimerApplication.java
@@ -4,6 +4,7 @@
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
@@ -16,6 +17,7 @@
@EnableAsync
@SpringBootApplication
@MapperScan("com.doumee.dao.*")
+@EnableDiscoveryClient
public class TimerApplication {
public static void main(String[] args) {
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/api/HkDeviceTimerController.java b/server/visits/admin_timer/src/main/java/com/doumee/api/HkDeviceTimerController.java
new file mode 100644
index 0000000..a764581
--- /dev/null
+++ b/server/visits/admin_timer/src/main/java/com/doumee/api/HkDeviceTimerController.java
@@ -0,0 +1,31 @@
+package com.doumee.api;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl;
+import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "璁惧瀹氭椂鍣ㄦ帴鍙�")
+@RestController
+@RequestMapping("/timer/device")
+public class HkDeviceTimerController extends BaseController {
+ @Autowired
+ private HkSyncDeviceServiceImpl hkSyncDeviceService;
+ @ApiOperation("寮�鍚畾鏃舵煡璇㈣澶囩姸鎬�")
+ @GetMapping("/getAscDeviceStatus")
+ public ApiResponse getAscDeviceStatus() {
+ hkSyncDeviceService.getAscDeviceStatus();
+ return ApiResponse.success("寮�鍚畾鏃舵煡璇㈣澶囩姸鎬佹垚鍔�");
+ }
+
+}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/api/HkEmpowerTimerController.java b/server/visits/admin_timer/src/main/java/com/doumee/api/HkEmpowerTimerController.java
new file mode 100644
index 0000000..d607494
--- /dev/null
+++ b/server/visits/admin_timer/src/main/java/com/doumee/api/HkEmpowerTimerController.java
@@ -0,0 +1,84 @@
+package com.doumee.api;
+
+import com.doumee.api.BaseController;
+import com.doumee.config.annotation.LoginNoRequired;
+import com.doumee.core.annotation.excel.ExcelExporter;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.dao.business.model.Cars;
+import com.doumee.service.business.CarsService;
+import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
+import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "浜哄憳璁惧鎺堟潈瀹氭椂鍣ㄦ帴鍙�")
+@RestController
+@RequestMapping("/timer/empower")
+public class HkEmpowerTimerController extends BaseController {
+ @Autowired
+ private HkSyncEmpowerServiceImpl hkSyncEmpowerService;
+
+
+ public static Integer endId2 = 0;
+ @ApiOperation("寮�鍚畾鏃舵煡璇汉鍛樿澶囨巿鏉冪粨鏋�")
+ @GetMapping("/syncEmpowerDetailData")
+ public ApiResponse syncEmpowerDetailData() {
+ if(endId2 ==null){
+ endId2 =0;
+ }
+ endId2 = hkSyncEmpowerService.syncEmpowerDetailData(endId2);
+ for (int i = 0; i < 9; i++) {
+ if(endId2!=null){
+ endId2 = hkSyncEmpowerService.syncEmpowerDetailData(endId2);
+ }
+ }
+ return ApiResponse.success("寮�鍚畾鏃舵煡璇汉鍛樿澶囨巿鏉冪粨鏋滄垚鍔�");
+ }
+ @ApiOperation("寮�鍚畾鏃舵煡璇汉鍛樿澶囨巿鏉冧笅杞借繘搴�")
+ @GetMapping("/syncEmpowerResultData")
+ public ApiResponse syncEmpowerResultData() {
+ hkSyncEmpowerService.syncEmpowerResultData(0);
+ return ApiResponse.success("寮�鍚畾鏃舵煡璇汉鍛樿澶囨巿鏉冧笅杞借繘搴︽垚鍔�");
+ }
+
+ @ApiOperation("寮�鍚畾鏃堕噸鏂颁笅鍙戝け璐ョ殑鎺堟潈鏁版嵁")
+ @GetMapping("/syncEmpowerFailData")
+ public ApiResponse syncEmpowerFailData() {
+ hkSyncEmpowerService.syncEmpowerFailData(0);
+ return ApiResponse.success("寮�鍚畾鏃堕噸鏂颁笅鍙戝け璐ョ殑鎺堟潈鏁版嵁鎴愬姛");
+ }
+
+ public static Integer endId = 0;
+ @Autowired
+ private HkSyncVehicleFromHKServiceImpl hkSyncVehicleFromHKService;
+ @ApiOperation("寮�鍚畾鏃跺埛鏂颁汉鍛樿澶囨巿鏉�")
+ @GetMapping("/syncEmpowerData")
+ public ApiResponse syncEmpowerData() {
+ if(endId ==null){
+ endId =0;
+ }
+ endId = hkSyncEmpowerService.syncEmpowerData(endId);
+ for (int i = 0; i < 9; i++) {
+ if(endId!=null){
+ endId = hkSyncEmpowerService.syncEmpowerData(endId);
+ }
+ }
+ return ApiResponse.success("寮�鍚畾鏃跺埛鏂颁汉鍛樿澶囨巿鏉冩垚鍔�");
+ }
+
+}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/api/HkImageTimerController.java b/server/visits/admin_timer/src/main/java/com/doumee/api/HkImageTimerController.java
new file mode 100644
index 0000000..b4d6de4
--- /dev/null
+++ b/server/visits/admin_timer/src/main/java/com/doumee/api/HkImageTimerController.java
@@ -0,0 +1,40 @@
+package com.doumee.api;
+
+import com.doumee.api.BaseController;
+import com.doumee.config.DataSyncConfig;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl;
+import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "娴峰悍浜嬩欢鍥剧墖涓嬭浇瀹氭椂鍣ㄦ帴鍙�")
+@RestController
+@RequestMapping("/timer/image")
+public class HkImageTimerController extends BaseController {
+
+ /**
+ * 鏄惁寮�鍙戣��
+ */
+ @Autowired
+ private DataSyncConfig dataSyncConfig;
+ @Autowired
+ private HkSyncImgServiceImpl hkSyncImgService;
+ @ApiOperation("寮�鍚畾鏃朵笅杞芥捣搴风郴缁熷浘鐗囨暟鎹�")
+ @GetMapping("/downHKImgs")
+ public ApiResponse downHKImgs() {
+ if(dataSyncConfig.getNeedDealImg()!=null && dataSyncConfig.getNeedDealImg()){
+ hkSyncImgService.downHKImgs(0);
+ }
+ return ApiResponse.success("寮�鍚畾鏃朵笅杞芥捣搴风郴缁熷浘鐗囨暟鎹垚鍔�");
+ }
+
+}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/api/HkLogTimerController.java b/server/visits/admin_timer/src/main/java/com/doumee/api/HkLogTimerController.java
new file mode 100644
index 0000000..6a04b5e
--- /dev/null
+++ b/server/visits/admin_timer/src/main/java/com/doumee/api/HkLogTimerController.java
@@ -0,0 +1,37 @@
+package com.doumee.api;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.utils.Constants;
+import com.doumee.service.business.InterfaceLogService;
+import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl;
+import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "鏃ュ織瀹氭椂鍣ㄦ帴鍙�")
+@RestController
+@RequestMapping("/timer/log")
+public class HkLogTimerController extends BaseController {
+
+ @Autowired
+ private InterfaceLogService interfaceLogService;
+ @ApiOperation("寮�鍚畾鏃舵帴鍙f棩蹇楁竻鐞�")
+ @GetMapping("/clearThreeMonthLog")
+ public ApiResponse clearThreeMonthLog() {
+ interfaceLogService.clearThreeMonthLog();
+ return ApiResponse.success("寮�鍚畾鏃舵帴鍙f棩蹇楁竻鐞嗘垚鍔�");
+ }
+
+
+}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/api/HkParkTimerController.java b/server/visits/admin_timer/src/main/java/com/doumee/api/HkParkTimerController.java
new file mode 100644
index 0000000..e1ab224
--- /dev/null
+++ b/server/visits/admin_timer/src/main/java/com/doumee/api/HkParkTimerController.java
@@ -0,0 +1,44 @@
+package com.doumee.api;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
+import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl;
+import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "鍋滆溅鍦烘帴鍙�")
+@RestController
+@RequestMapping("/timer/park")
+public class HkParkTimerController extends BaseController {
+
+ @Autowired
+ private HkSyncVehicleFromHKServiceImpl hkSyncVehicleFromHKService;
+ @Autowired
+ private HkSyncParkServiceImpl hkSyncParkService;
+
+ @ApiOperation("寮�鍚畾鏃惰溅杈嗗寘鏈熸巿鏉�")
+ @GetMapping("/syncParkBookData")
+ public ApiResponse syncParkBookData() {
+ hkSyncParkService.syncParkBookData();
+ return ApiResponse.success("寮�鍚畾鏃惰溅杈嗗寘鏈熸巿鏉冩垚鍔�");
+ }
+ @ApiOperation("寮�鍚畾鏃舵煡璇㈣溅杈嗘煡璇�")
+ @GetMapping("/syncVehicleUpdateData")
+ public ApiResponse syncVehicleUpdateData() {
+ hkSyncVehicleFromHKService.syncVehicleUpdateData(new Date(System.currentTimeMillis()-24*60*60*1000));
+ return ApiResponse.success("寮�鍚畾鏃舵煡璇㈣溅杈嗘煡璇㈡垚鍔�");
+ }
+
+}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/api/HkUsersTimerController.java b/server/visits/admin_timer/src/main/java/com/doumee/api/HkUsersTimerController.java
new file mode 100644
index 0000000..879d448
--- /dev/null
+++ b/server/visits/admin_timer/src/main/java/com/doumee/api/HkUsersTimerController.java
@@ -0,0 +1,66 @@
+package com.doumee.api;
+
+import com.doumee.api.BaseController;
+import com.doumee.config.DataSyncConfig;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.utils.Constants;
+import com.doumee.service.business.MemberService;
+import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl;
+import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "缁勭粐浜哄憳瀹氭椂鍣ㄦ帴鍙�")
+@RestController
+@RequestMapping("/timer/orguser")
+public class HkUsersTimerController extends BaseController {
+
+ @Autowired
+ private HkSyncOrgUserToHKServiceImpl hkSyncOrgUserService;
+ @Autowired
+ private MemberService memberService;
+ /**
+ * 鏄惁寮�鍙戣��
+ */
+ @Autowired
+ private DataSyncConfig dataSyncConfig;
+
+ @ApiOperation("寮�鍚畾鏃跺悓姝ユ捣搴风粍缁囨暟鎹�")
+ @GetMapping("/syncOrgData")
+ public ApiResponse syncOrgData() {
+ if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp){
+ //濡傛灉鏄疎RP绯荤粺鍚屾涓嬪彂
+ hkSyncOrgUserService.syncOrgData();
+ }
+ return ApiResponse.success("寮�鍚畾鏃跺悓姝ユ捣搴风粍缁囨暟鎹垚鍔�");
+ }
+ @ApiOperation("寮�鍚畾鏃堕噸鏂颁笅鍙戝垹闄や汉鍛樻暟鎹�")
+ @GetMapping("/syncMemberDelData")
+ public ApiResponse syncMemberDelData() {
+ hkSyncOrgUserService.syncMemberDelData();
+ return ApiResponse.success("寮�鍚畾鏃堕噸鏂颁笅鍙戝垹闄や汉鍛樻暟鎹垚鍔�");
+ }
+ @ApiOperation("寮�鍚畾鏃跺悓姝ユ捣搴蜂汉鍛樻暟鎹�")
+ @GetMapping("/syncUserData")
+ public ApiResponse syncUserData() {
+ if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp) {
+ //濡傛灉鏄疎RP绯荤粺鍚屾涓嬪彂
+ hkSyncOrgUserService.syncUserData();
+ }
+ return ApiResponse.success("寮�鍚畾鏃跺悓姝ユ捣搴蜂汉鍛樻暟鎹垚鍔�");
+ }
+ @ApiOperation("寮�鍚畾鏃跺喕缁撲汉鍛�")
+ @GetMapping("/memberFreeze")
+ public ApiResponse memberFreeze() {
+ memberService.memberFreeze();
+ return ApiResponse.success("寮�鍚畾鏃跺喕缁撲汉鍛樻垚鍔�");
+ }
+}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/api/HkVisitTimerController.java b/server/visits/admin_timer/src/main/java/com/doumee/api/HkVisitTimerController.java
new file mode 100644
index 0000000..b6e4cac
--- /dev/null
+++ b/server/visits/admin_timer/src/main/java/com/doumee/api/HkVisitTimerController.java
@@ -0,0 +1,60 @@
+package com.doumee.api;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.utils.Constants;
+import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl;
+import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl;
+import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "璁垮瀹氭椂鍣ㄦ帴鍙�")
+@RestController
+@RequestMapping("/timer/visit")
+public class HkVisitTimerController extends BaseController {
+
+ @Autowired
+ private HkSyncVisitServiceImpl hkSyncVisitService;
+ @Autowired
+ private HkSyncVisitFromHKServiceImpl hkSyncVisitFromHKService;
+ @ApiOperation("寮�鍚畾鏃朵笅鍙戣瀹㈤绾︾敵璇�")
+ @GetMapping("/syncVisitData")
+ public ApiResponse syncVisitData() {
+ hkSyncVisitService.syncVisitData();
+ return ApiResponse.success("寮�鍚畾鏃朵笅鍙戣瀹㈤绾︾敵璇锋垚鍔�");
+ }
+ @ApiOperation("寮�鍚畾鏃舵煡璇㈣瀹㈤绾︾姸鎬�")
+ @GetMapping("/getOutTimeVisitRecord")
+ public ApiResponse getOutTimeVisitRecord() {
+ hkSyncVisitService.getOutTimeVisitRecord();
+ return ApiResponse.success("寮�鍚畾鏃舵煡璇㈣瀹㈤绾︾姸鎬佹垚鍔�");
+ }
+ @ApiOperation("寮�鍚畾鏃朵粖鏃ョ殑璁垮棰勭害鏁版嵁")
+ @GetMapping("/syncVistAppointData")
+ public ApiResponse syncVistAppointData() {
+ if(!Constants.DEALING_FROM_HK_VISIT){
+ try {
+ Constants.DEALING_FROM_HK_VISIT =true;
+ hkSyncVisitFromHKService.syncVistAppointData(new Date());
+ Constants.DEALING_FROM_HK_VISIT =false;
+ }catch (Exception e){
+
+ }finally {
+ Constants.DEALING_FROM_HK_VISIT =false;
+ }
+ }
+ return ApiResponse.success("寮�鍚畾鏃朵粖鏃ョ殑璁垮棰勭害鏁版嵁鎴愬姛");
+ }
+
+}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleCommonTool.java b/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleCommonTool.java
deleted file mode 100644
index 2a6b41e..0000000
--- a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleCommonTool.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package com.doumee.task;
-
-
-import com.doumee.config.DataSyncConfig;
-import com.doumee.core.utils.Constants;
-import com.doumee.service.business.InterfaceLogService;
-import com.doumee.service.business.MemberService;
-import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
-import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl;
-import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl;
-import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl;
-import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl;
-import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl;
-import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-
-/**
- * 瀹氭椂浠诲姟
- * @author jiangping
- * @date 2021-10-10 14:40:35
- * https://www.bejson.com/othertools/cron/ cron 琛ㄨ揪寮忕敓鎴愬湴鍧�
- */
-//@Component
-//@EnableScheduling
-public class ScheduleCommonTool {
-
- @Autowired
- private HkSyncImgServiceImpl hkSyncImgService;
- @Autowired
- private HkSyncOrgUserToHKServiceImpl hkSyncOrgUserService;
- @Autowired
- private HkSyncVisitFromHKServiceImpl hkSyncVisitFromHKService;
- @Autowired
- private HkSyncVehicleFromHKServiceImpl hkSyncVehicleFromHKService;
- @Autowired
- private HkSyncVisitServiceImpl hkSyncVisitService;
- @Autowired
- private MemberService memberService;
- @Autowired
- private InterfaceLogService interfaceLogService;
- /**
- * 鏄惁寮�鍙戣��
- */
- @Autowired
- private DataSyncConfig dataSyncConfig;
-
- /**
- * 姣忓垎閽熸媺鍙栦竴娆′粖鏃ョ殑璁垮棰勭害鏁版嵁
- * @throws Exception
- */
- @Scheduled(cron= "0 0 23 * * ?")
- public void syncVehicleUpdateData() throws Exception {
- hkSyncVehicleFromHKService.syncVehicleUpdateData(new Date(System.currentTimeMillis()-24*60*60*1000));
- }
- /**
- * 姣忓垎閽熸媺鍙栦竴娆′粖鏃ョ殑璁垮棰勭害鏁版嵁
- * @throws Exception
- */
- @Scheduled(fixedRate= 30*1000)
- public void syncVistAppointData() throws Exception {
- if(Constants.DEALING_FROM_HK_VISIT){
- return ;
- }
- try {
- Constants.DEALING_FROM_HK_VISIT =true;
- hkSyncVisitFromHKService.syncVistAppointData(new Date());
- Constants.DEALING_FROM_HK_VISIT =false;
- }catch (Exception e){
-// throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵逛笉璧凤紝娴峰悍鍚屾鏁版嵁澶辫触~");
- }finally {
- Constants.DEALING_FROM_HK_VISIT =false;
- }
- }
- /**
- * 姣�10鍒嗛挓鎷夊彇涓�娆℃渶鏂拌瀹㈢櫥璁扮姸鎬侊紙棰勭害鎴愬姛鍜屽凡鐧昏锛�
- * @throws Exception
- */
- @Scheduled(fixedRate= 10*60*1000)
- public void syncVisitOuttimeStatus() throws Exception {
- hkSyncVisitService.getOutTimeVisitRecord();
- }
- /**
- * 涓嬭浇娴峰悍绯荤粺鍥剧墖鏁版嵁
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000)
- public void downloadHkImg() throws Exception {
- if(dataSyncConfig.getNeedDealImg()!=null && dataSyncConfig.getNeedDealImg()){
- hkSyncImgService.downHKImgs(0);
- }
- }
- /**
- * 瀹氭椂鍚屾缁勭粐淇℃伅鍒版捣搴风郴缁�
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000)
- public void syncOrgData() {
- if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp){
- //濡傛灉鏄疎RP绯荤粺鍚屾涓嬪彂
- hkSyncOrgUserService.syncOrgData();
- }
- }
- /**
- * 瀹氭椂鍚屾鐢ㄦ埛淇℃伅鍒版捣搴风郴缁�
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000)
- public void syncUserData() {
- if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp) {
- //濡傛灉鏄疎RP绯荤粺鍚屾涓嬪彂
- hkSyncOrgUserService.syncUserData();
- }
- }
- /**
- * 瀹氭椂鍚屾鐢宠閫氳繃鐨勮瀹㈡暟鎹埌娴峰悍绯荤粺
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000)
- public void syncVisitData() {
- hkSyncVisitService.syncVisitData();
- }
-
-
- /**
- * 瀹氭椂鍐荤粨鍐呴儴浜哄憳
- */
-// @Scheduled(fixedRate= 60*1000)
- public void memberFreeze() {
- memberService.memberFreeze();
- }
- /**
- * 姣忓ぉ娓呯悊瓒呰繃涓�鍛ㄧ殑鎺ュ彛鏃ュ織鏁版嵁锛堟竻闄ゅ拰瀹夐槻骞冲彴瀵规帴鐨勬帴鍙f暟鎹級
- * @throws Exception
- */
- @Scheduled(cron= "0 0 23 * * ?")
- public void clearThreeMonthLog() throws Exception {
- interfaceLogService.clearThreeMonthLog();
- }
-}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleDeviceStatusTool.java b/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleDeviceStatusTool.java
deleted file mode 100644
index 82ca768..0000000
--- a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleDeviceStatusTool.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.doumee.task;
-
-
-import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl;
-import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-/**
- * 瀹氭椂浠诲姟
- * @author jiangping
- * @date 2021-10-10 14:40:35
- * https://www.bejson.com/othertools/cron/ cron 琛ㄨ揪寮忕敓鎴愬湴鍧�
- */
-@Component
-@EnableScheduling
-public class ScheduleDeviceStatusTool {
-
- public static Integer endId = 0;
- @Autowired
- private HkSyncDeviceServiceImpl hkSyncDeviceService;
- /**
- * 瀹氭椂鐩戝惉璁惧鐘舵��
- */
- @Scheduled(fixedRate= 60*1000*5)
- public void ascDeviceStatus() {
- hkSyncDeviceService.getAscDeviceStatus();
- }
-}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleMemberDelTool.java b/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleMemberDelTool.java
deleted file mode 100644
index 487adf2..0000000
--- a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleMemberDelTool.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.doumee.task;
-
-
-import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
-import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-/**
- * 瀹氭椂浠诲姟
- * @author jiangping
- * @date 2021-10-10 14:40:35
- * https://www.bejson.com/othertools/cron/ cron 琛ㄨ揪寮忕敓鎴愬湴鍧�
- */
-@Component
-@EnableScheduling
-public class ScheduleMemberDelTool {
-
- public static Integer endId = 0;
- @Autowired
- private HkSyncOrgUserToHKServiceImpl hkSyncOrgUserToHKService;
-
- /**
- * 瀹氭椂閲嶆柊涓嬪彂鍒犻櫎浜哄憳鏁版嵁
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000*10)
- public void syncEmpowerDetailData() {
- hkSyncOrgUserToHKService.syncMemberDelData();
- }
-}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleParkBookTool.java b/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleParkBookTool.java
deleted file mode 100644
index 492df5c..0000000
--- a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleParkBookTool.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.doumee.task;
-
-
-import com.doumee.config.DataSyncConfig;
-import com.doumee.core.utils.Constants;
-import com.doumee.service.business.InterfaceLogService;
-import com.doumee.service.business.MemberService;
-import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
-import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl;
-import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl;
-import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl;
-import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl;
-import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl;
-import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-
-/**
- * 瀹氭椂浠诲姟
- * @author jiangping
- * @date 2021-10-10 14:40:35
- * https://www.bejson.com/othertools/cron/ cron 琛ㄨ揪寮忕敓鎴愬湴鍧�
- */
-@Component
-@EnableScheduling
-public class ScheduleParkBookTool {
-
- @Autowired
- private HkSyncParkServiceImpl hkSyncParkService;
- /**
- * 鏄惁寮�鍙戣��
- */
- @Autowired
- private DataSyncConfig dataSyncConfig;
-
- /**
- * 瀹氭椂鍚屾杞﹁締鍖呮湡鍒版捣搴风郴缁�
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000)
- public void syncParkBookDataNew() {
- hkSyncParkService.syncParkBookData();
- }
-
-}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskDetailTool.java b/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskDetailTool.java
deleted file mode 100644
index e61efcb..0000000
--- a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskDetailTool.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.doumee.task;
-
-
-import com.doumee.config.DataSyncConfig;
-import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
-import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-/**
- * 瀹氭椂浠诲姟
- * @author jiangping
- * @date 2021-10-10 14:40:35
- * https://www.bejson.com/othertools/cron/ cron 琛ㄨ揪寮忕敓鎴愬湴鍧�
- */
-@Component
-@EnableScheduling
-public class ScheduleTaskDetailTool {
-
- public static Integer endId = 0;
- @Autowired
- private HkSyncEmpowerServiceImpl hkSyncEmpowerService;
-
- /**
- * 瀹氭椂鏌ヨ浜哄憳瀹為檯涓嬪彂鏉冮檺缁撴灉锛屾槸鍚﹀凡缁忎笅杞芥垚鍔�
- * @throws Exception
- */
- @Scheduled(fixedRate= 30*1000)
- public void syncEmpowerDetailData() {
- if(endId ==null){
- endId =0;
- }
- endId = hkSyncEmpowerService.syncEmpowerDetailData(endId);
- for (int i = 0; i < 9; i++) {
- if(endId!=null){
- endId = hkSyncEmpowerService.syncEmpowerDetailData(endId);
- }
- }
- }
-}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskFailRetrylTool.java b/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskFailRetrylTool.java
deleted file mode 100644
index 8f3a2fc..0000000
--- a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskFailRetrylTool.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.doumee.task;
-
-
-import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-/**
- * 瀹氭椂浠诲姟
- * @author jiangping
- * @date 2021-10-10 14:40:35
- * https://www.bejson.com/othertools/cron/ cron 琛ㄨ揪寮忕敓鎴愬湴鍧�
- */
-@Component
-@EnableScheduling
-public class ScheduleTaskFailRetrylTool {
-
- public static Integer endId = 0;
- @Autowired
- private HkSyncEmpowerServiceImpl hkSyncEmpowerService;
-
- /**
- * 瀹氭椂瀵逛笅鍙戝け璐ョ殑鎺堟潈杩涜閲嶈瘯锛�10鍒嗛挓锛�
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000 *10)
- public void syncEmpowerDetailData() {
- hkSyncEmpowerService.syncEmpowerFailData(endId);
- }
-}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskProgressTool.java b/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskProgressTool.java
deleted file mode 100644
index 140886a..0000000
--- a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskProgressTool.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.doumee.task;
-
-
-import com.doumee.config.DataSyncConfig;
-import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
-import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-/**
- * 瀹氭椂浠诲姟
- * @author jiangping
- * @date 2021-10-10 14:40:35
- * https://www.bejson.com/othertools/cron/ cron 琛ㄨ揪寮忕敓鎴愬湴鍧�
- */
-@Component
-@EnableScheduling
-public class ScheduleTaskProgressTool {
-
- public static Integer endId = 0;
- @Autowired
- private HkSyncEmpowerServiceImpl hkSyncEmpowerService;
- /**
- * 瀹氭椂鏌ヨ浜哄憳涓嬪彂娴峰悍缁撴灉锛堜换鍔℃槸鍚﹀凡涓嬭浇缁撴潫锛�
- * @throws Exception
- */
- @Scheduled(fixedRate=20*1000)
- public void syncEmpowerResultData() {
- hkSyncEmpowerService.syncEmpowerResultData(endId);
- }
-
-}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskSendTool.java b/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskSendTool.java
deleted file mode 100644
index 1fcf1ab..0000000
--- a/server/visits/admin_timer/src/main/java/com/doumee/task/ScheduleTaskSendTool.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.doumee.task;
-
-
-import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-/**
- * 瀹氭椂浠诲姟
- * @author jiangping
- * @date 2021-10-10 14:40:35
- * https://www.bejson.com/othertools/cron/ cron 琛ㄨ揪寮忕敓鎴愬湴鍧�
- */
-@Component
-@EnableScheduling
-public class ScheduleTaskSendTool {
- @Autowired
- private HkSyncEmpowerServiceImpl hkSyncEmpowerService;
-
- public static Integer endId = 0;
- /**
- * 瀹氭椂鍚屾鍐呴儴浜哄憳鎺堟潈鍒版捣搴风郴缁�
- * @throws Exception
- */
- @Scheduled(fixedRate= 30*1000)
- public void syncEmpowerData() {
- if(endId ==null){
- endId =0;
- }
- endId = hkSyncEmpowerService.syncEmpowerData(endId);
- for (int i = 0; i < 9; i++) {
- if(endId!=null){
- endId = hkSyncEmpowerService.syncEmpowerData(endId);
- }
- }
- }
-
-}
diff --git a/server/visits/admin_timer/src/main/resources/application.yml b/server/visits/admin_timer/src/main/resources/application.yml
index b52a3fb..459addc 100644
--- a/server/visits/admin_timer/src/main/resources/application.yml
+++ b/server/visits/admin_timer/src/main/resources/application.yml
@@ -10,7 +10,7 @@
# application:
# name: doumeevisit
profiles:
- active: proHS
+ active: dev
# JSON杩斿洖閰嶇疆
jackson:
diff --git a/server/visits/admin_timer/src/main/resources/bootstrap.yml b/server/visits/admin_timer/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..3bcb81f
--- /dev/null
+++ b/server/visits/admin_timer/src/main/resources/bootstrap.yml
@@ -0,0 +1,36 @@
+spring:
+ application:
+ name: visitsTimer
+ # 瀹夊叏閰嶇疆
+ security:
+ # 楠岀鍏挜鍦板潃
+ oauth2:
+ authorizationserver:
+ token-uri: https://
+ cloud:
+ loadbalancer:
+ enabled: true
+ nacos:
+ # 浣跨敤Nacos璐熻浇绛栫暐锛屽紑鍙戠幆澧冨彲浠ュ埄鐢ㄥ氨杩戣闂満鍒跺畾鍚戣闂紝鍚姩鍙傛暟濡備笅锛�
+ # -Dspring.cloud.nacos.discovery.cluster-name=鑷畾涔�
+ enabled: true
+ cache:
+ # 鏆傛椂鍏抽棴缂撳瓨
+ enabled: false
+ nacos:
+ server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
+ username: nacos
+ password: nacos
+# config:
+# server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
+# namespace: dmvisit
+# username: nacos
+# password: nacos
+# file-extension: yaml
+# group: dev
+# data-id: com.doumee.meeting.admin
+ discovery:
+ server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
+ namespace: dmvisit
+ username: nacos
+ password: nacos
diff --git a/server/visits/admin_timer/src/main/resources/logback.xml b/server/visits/admin_timer/src/main/resources/logback.xml
deleted file mode 100644
index 8358dbb..0000000
--- a/server/visits/admin_timer/src/main/resources/logback.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<configuration>
- <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>logs/myapp.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- daily rollover with compression -->
- <fileNamePattern>logs/admin_timer.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
- <!-- keep 30 days' worth of history -->
- <maxHistory>30</maxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
- </encoder>
- </appender>
-
- <logger name="com.doumee" level="DEBUG" additivity="false">
- <appender-ref ref="FILE" />
- </logger>
-
- <!-- other configurations... -->
-</configuration>
\ No newline at end of file
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/cloud/CloudCarsController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/CloudCarsController.java
similarity index 98%
rename from server/visits/dmvisit_admin/src/main/java/com/doumee/api/cloud/CloudCarsController.java
rename to server/visits/dmvisit_admin/src/main/java/com/doumee/api/CloudCarsController.java
index fc80da1..6cc3e51 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/cloud/CloudCarsController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/CloudCarsController.java
@@ -1,4 +1,4 @@
-package com.doumee.api.cloud;
+package com.doumee.api;
import com.doumee.api.BaseController;
import com.doumee.config.annotation.LoginNoRequired;
@@ -28,7 +28,6 @@
@RestController
@RequestMapping("/cloudService/cars")
public class CloudCarsController extends BaseController {
-
@Autowired
private CarsService carsService;
@Autowired
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
deleted file mode 100644
index 87a1866..0000000
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package com.doumee.task;
-
-
-import com.doumee.config.DataSyncConfig;
-import com.doumee.core.constants.ResponseStatus;
-import com.doumee.core.exception.BusinessException;
-import com.doumee.core.utils.Constants;
-import com.doumee.service.business.InterfaceLogService;
-import com.doumee.service.business.MemberService;
-import com.doumee.service.business.impl.hksync.*;
-import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl;
-import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl;
-import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-
-/**
- * 瀹氭椂浠诲姟锛堝簾寮冿級
- * @author jiangping
- * @date 2021-10-10 14:40:35
- * https://www.bejson.com/othertools/cron/ cron 琛ㄨ揪寮忕敓鎴愬湴鍧�
- */
-@Component
-@EnableScheduling
-public class ScheduleTool {
-
- @Autowired
- private HkSyncParkServiceImpl hkSyncParkService;
- @Autowired
- private HkSyncImgServiceImpl hkSyncImgService;
- @Autowired
- private HkSyncEmpowerServiceImpl hkSyncEmpowerService;
- @Autowired
- private HkSyncOrgUserToHKServiceImpl hkSyncOrgUserService;
- @Autowired
- private HkSyncVisitFromHKServiceImpl hkSyncVisitFromHKService;
- @Autowired
- private HkSyncVehicleFromHKServiceImpl hkSyncVehicleFromHKService;
- @Autowired
- private HkSyncVisitServiceImpl hkSyncVisitService;
- @Autowired
- private MemberService memberService;
- @Autowired
- private InterfaceLogService interfaceLogService;
- /**
- * 鏄惁寮�鍙戣��
- */
- @Autowired
- private DataSyncConfig dataSyncConfig;
-
- /**
- * 姣忓垎閽熸媺鍙栦竴娆′粖鏃ョ殑璁垮棰勭害鏁版嵁
- * @throws Exception
- */
- @Scheduled(cron= "0 0 23 * * ?")
- public void syncVehicleUpdateData() throws Exception {
- hkSyncVehicleFromHKService.syncVehicleUpdateData(new Date(System.currentTimeMillis()-24*60*60*1000));
- }
- /**
- * 姣忓垎閽熸媺鍙栦竴娆′粖鏃ョ殑璁垮棰勭害鏁版嵁
- * @throws Exception
- */
- @Scheduled(fixedRate= 30*1000)
- public void syncVistAppointData() throws Exception {
- if(Constants.DEALING_FROM_HK_VISIT){
- return ;
- }
- try {
- Constants.DEALING_FROM_HK_VISIT =true;
- hkSyncVisitFromHKService.syncVistAppointData(new Date());
- Constants.DEALING_FROM_HK_VISIT =false;
- }catch (Exception e){
-// throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵逛笉璧凤紝娴峰悍鍚屾鏁版嵁澶辫触~");
- }finally {
- Constants.DEALING_FROM_HK_VISIT =false;
- }
- }
- /**
- * 姣�10鍒嗛挓鎷夊彇涓�娆℃渶鏂拌瀹㈢櫥璁扮姸鎬侊紙棰勭害鎴愬姛鍜屽凡鐧昏锛�
- * @throws Exception
- */
- @Scheduled(fixedRate= 10*60*1000)
- public void syncVisitOuttimeStatus() throws Exception {
- hkSyncVisitService.getOutTimeVisitRecord();
- }
- /**
- * 涓嬭浇娴峰悍绯荤粺鍥剧墖鏁版嵁
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000)
- public void downloadHkImg() throws Exception {
- if(dataSyncConfig.getNeedDealImg()!=null && dataSyncConfig.getNeedDealImg()){
- hkSyncImgService.downHKImgs(0);
- }
- }
- /**
- * 瀹氭椂鍚屾缁勭粐淇℃伅鍒版捣搴风郴缁�
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000)
- public void syncOrgData() {
- if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp){
- //濡傛灉鏄疎RP绯荤粺鍚屾涓嬪彂
- hkSyncOrgUserService.syncOrgData();
- }
- }
- /**
- * 瀹氭椂鍚屾鐢ㄦ埛淇℃伅鍒版捣搴风郴缁�
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000)
- public void syncUserData() {
- if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp) {
- //濡傛灉鏄疎RP绯荤粺鍚屾涓嬪彂
- hkSyncOrgUserService.syncUserData();
- }
- }
- /**
- * 瀹氭椂鍚屾鐢宠閫氳繃鐨勮瀹㈡暟鎹埌娴峰悍绯荤粺
- * @throws Exception
- */
- @Scheduled(fixedRate= 60*1000)
- public void syncVisitData() {
- hkSyncVisitService.syncVisitData();
- }
- /* *//**
- * 瀹氭椂鍚屾鍐呴儴浜哄憳鎺堟潈鍒版捣搴风郴缁�
- * @throws Exception
- *//*
- @Scheduled(fixedRate= 3*1000)
- public void syncEmpowerData() {
- hkSyncEmpowerService.syncEmpowerData();
- }
- *//**
- * 瀹氭椂鏌ヨ浜哄憳涓嬪彂娴峰悍缁撴灉锛堜换鍔℃槸鍚﹀凡涓嬭浇缁撴潫锛�
- * @throws Exception
- *//*
- @Scheduled(fixedRate= 60*1000)
- public void syncEmpowerResultData() {
- hkSyncEmpowerService.syncEmpowerResultData();
- }
- */
- /**
- * 瀹氭椂鏌ヨ浜哄憳瀹為檯涓嬪彂鏉冮檺缁撴灉锛屾槸鍚﹀凡缁忎笅杞芥垚鍔�
- * @throws Exception
- *//*
- @Scheduled(fixedRate= 60*1000)
- public void syncEmpowerDetailData() {
- hkSyncEmpowerService.syncEmpowerDetailData();
- }*/
-
-
- /**
- * 瀹氭椂鍐荤粨鍐呴儴浜哄憳
- */
-// @Scheduled(fixedRate= 60*1000)
- public void memberFreeze() {
- memberService.memberFreeze();
- }
- /**
- * 姣忓ぉ娓呯悊瓒呰繃涓�鍛ㄧ殑鎺ュ彛鏃ュ織鏁版嵁锛堟竻闄ゅ拰瀹夐槻骞冲彴瀵规帴鐨勬帴鍙f暟鎹級
- * @throws Exception
- */
- @Scheduled(cron= "0 0 23 * * ?")
- public void clearThreeMonthLog() throws Exception {
- interfaceLogService.clearThreeMonthLog();
- }
-}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
index b61accf..8e4f32a 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -950,16 +950,16 @@
* @return
*/
public static BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> vehicleTimeRangeList(TimeRangeListRequest param){
- log.info("銆愭捣搴峰閲忎汉鍛樻煡璇€��================寮�濮�===="+JSONObject.toJSONString(param));
+ log.info("銆愭捣搴峰閲忚溅杈嗘煡璇€��================寮�濮�===="+JSONObject.toJSONString(param));
try {
String res = HKTools.vehicleTimeRangeList(JSONObject.toJSONString(param));
TypeReference typeReference =
new TypeReference< BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> >(){};
BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType());
- logResult(result,"娴峰悍澧為噺浜哄憳鏌ヨ");
+ logResult(result,"娴峰悍澧為噺杞﹁締鏌ヨ");
return result;
}catch (Exception e){
- log.error("銆愭捣搴峰閲忎汉鍛樻煡璇€��================澶辫触====锛歕n"+ e.getMessage());
+ log.error("銆愭捣搴峰閲忚溅杈嗘煡璇€��================澶辫触====锛歕n"+ e.getMessage());
}
return null;
}
diff --git a/server/visits/pom.xml b/server/visits/pom.xml
index 5c307b2..89e31b2 100644
--- a/server/visits/pom.xml
+++ b/server/visits/pom.xml
@@ -46,11 +46,6 @@
</dependency>
<!-- 鎺ュ彛鏂囨。 -->
- <!--dependency>
- <groupId>com.github.xiaoymin</groupId>
- <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
- <version>4.3.0</version>
- </dependency>-->
</dependencies>
<properties>
<maven.compiler.source>8</maven.compiler.source>
--
Gitblit v1.9.3