自动化立体仓库 - WMS系统
chen.llin
3 天以前 d7020a8f1ec6f55167b4ad14941de0e28ce3d8c1
src/main/java/com/zy/system/timer/TokenTimer.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.zy.common.properties.SchedulerProperties;
import com.zy.system.entity.UserLogin;
import com.zy.system.service.UserLoginService;
import lombok.extern.slf4j.Slf4j;
@@ -10,6 +11,7 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
@@ -28,8 +30,14 @@
    @Value("${super.pwd}")
    private String superPwd;
    @Resource
    private SchedulerProperties schedulerProperties;
    @Scheduled(cron = "0/30 * * * * ? ")
    public void timer() {
        if (!schedulerProperties.isEnabled()) {
            return;
        }
        if (loadingConfigTimer.getTokenNumber() == 1) {
            return;
        }