#
vincentlu
2025-05-13 ebd2f4397a92c6a5096de1b86d59154363344720
zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/LogDataScheduler.java
@@ -5,6 +5,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Optional;
@@ -13,7 +14,7 @@
 * Created by vincent on 5/8/2024
 */
@Slf4j
//@Component
@Component
@SuppressWarnings("all")
public class LogDataScheduler {
@@ -26,11 +27,13 @@
    @Transactional
    public void syncLog() {
        Integer dataExpiredDays = Optional.ofNullable(configService.getVal("dataExpiredDays", Integer.class)).orElse(7);
        this.syncTaskLog(dataExpiredDays);
        this.syncActionLog(dataExpiredDays);
        this.syncSegmentLog(dataExpiredDays);
        this.syncJamLog(dataExpiredDays);
        this.syncTravelLog(dataExpiredDays);
        if (dataExpiredDays > 0) {
            this.syncTaskLog(dataExpiredDays);
            this.syncActionLog(dataExpiredDays);
            this.syncSegmentLog(dataExpiredDays);
            this.syncJamLog(dataExpiredDays);
            this.syncTravelLog(dataExpiredDays);
        }
    }
    public void syncTaskLog(Integer dataExpiredDays){