测试环境配置

李一帆 2025-08-21 09:28:40 +08:00
parent 025e27ab8b
commit 039286f266
1 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,53 @@
package com.whdc.component;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.whdc.mapper.AutoCallConfigMapper;
import com.whdc.mapper.AutoCallPersonMapper;
import com.whdc.model.autocall.AutoCallPerson;
import com.whdc.model.autocall.AutoCallTask;
import com.whdc.service.autocall.AutoCallTaskService2;
import com.whdc.utils.AutoCallHelper;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.Profile;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.PreDestroy;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* @author lyf
* @since 2025-06-20
*/
@Component
@Slf4j
@Profile({"gs"})
public class AutoCallTaskScheduledGS {
@Autowired
private AutoCallTaskService2 autoCallTaskService;
@Autowired
private AutoCallPersonMapper personMapper;
@Autowired
private AutoCallConfigMapper configMapper;
@Autowired
private AutoCallHelper autoCallHelper;
private final AtomicBoolean initialized = new AtomicBoolean(false);
//早上10点后晚上24点前每隔15分钟执行一次
@Scheduled(cron = "0 0/15 10-23 * * ?")
public void generateTaskLoop() {
// autoCallTaskService.generateFakeCallLyfOnly();
}
}