From 23b4e7942a8524ed1e89d93c55a470f0dc263d5a Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 06 六月 2025 13:54:01 +0800
Subject: [PATCH] *

---
 src/main/java/com/zy/core/ServerBootstrap.java |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java
index 862d803..54bfe7d 100644
--- a/src/main/java/com/zy/core/ServerBootstrap.java
+++ b/src/main/java/com/zy/core/ServerBootstrap.java
@@ -5,7 +5,9 @@
 import com.zy.core.enums.SlaveType;
 import com.zy.core.model.*;
 import com.zy.core.properties.SlaveProperties;
+import com.zy.core.properties.SystemProperties;
 import com.zy.core.thread.*;
+import com.zy.system.entity.license.LicenseVerify;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
@@ -130,4 +132,32 @@
     public void destroy() {
     }
 
+    @Component
+    class licenseVerifyThread {
+
+        @Scheduled(cron = "0 0 4 * * ?")
+        public void licenseVerify() {
+            int licenseVerifySignCount = 0;
+            boolean licenseVerifySign = false;
+            if (!new LicenseVerify().verify()){
+                for (licenseVerifySignCount = 0;!licenseVerifySign && licenseVerifySignCount<10; licenseVerifySignCount++){
+                    try{
+                        Thread.sleep(1000);
+                    }catch (Exception e){
+
+                    }
+                    if (!new LicenseVerify().verify()){
+                        log.info("++++++++ 楠岃瘉璁稿彲璇佸け璐� ++++++++");
+                    } else {
+                        log.info("++++++++ 楠岃瘉璁稿彲璇佹垚鍔� ++++++++");
+                        licenseVerifySign = true;
+                    }
+                }
+                if (licenseVerifySignCount>10 && !licenseVerifySign){
+                    SystemProperties.WCS_RUNNING_STATUS.set(Boolean.FALSE);
+                }
+            }
+        }
+    }
+
 }

--
Gitblit v1.9.1