测试环境配置
parent
b403c4b2fc
commit
67d637e797
|
|
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue