*
lsh
2025-10-22 41e4860f065a13b00441deff45455b62d3787e2c
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,36 @@
    public void destroy() {
    }
//    @Component
//    class licenseVerifyThread {
//
//        @Scheduled(cron = "0 0 4 * * ?")
//        public void licenseVerify() {
//            int licenseVerifySignCount = 0;
//            boolean licenseVerifySign = false;
//            boolean systemSign = SystemProperties.WCS_RUNNING_STATUS.get();
//            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);
//                } else {
//                    if (systemSign){
//                        SystemProperties.WCS_RUNNING_STATUS.set(Boolean.TRUE);
//                    }
//                }
//            }
//        }
//    }
}