公司机房测试环境配置,关闭呼叫任务等定时任务

李一帆 2025-08-15 14:41:51 +08:00
parent 13ee8d62b2
commit c705efd382
3 changed files with 156 additions and 2 deletions

View File

@ -28,7 +28,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
*/ */
@Component @Component
@Slf4j @Slf4j
@Profile({"default"}) @Profile({"gs"})
public class AutoCallTaskScheduled { public class AutoCallTaskScheduled {
@Autowired @Autowired
@ -43,7 +43,7 @@ public class AutoCallTaskScheduled {
private final AtomicBoolean initialized = new AtomicBoolean(false); private final AtomicBoolean initialized = new AtomicBoolean(false);
private final ExecutorService executorService = Executors.newCachedThreadPool(); private final ExecutorService executorService = Executors.newCachedThreadPool();
@EventListener(ApplicationReadyEvent.class) // @EventListener(ApplicationReadyEvent.class)
public void initialize() throws Exception { public void initialize() throws Exception {
try { try {
autoCallHelper.getToken(); autoCallHelper.getToken();

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();
}
}

View File

@ -0,0 +1,101 @@
server:
port: 20020
servlet:
context-path: /fxkhtxl
session:
# 配置会话超时
timeout: 120s
encoding:
charset: UTF-8
enabled: true
force: true
spring:
#数据库配置
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: dm.jdbc.driver.DmDriver
# url: jdbc:dm://local.gunshiiot.com:5236?schema=FXKH_TXL
# username: SYSDBA
# password: SYSDBA001
url: jdbc:dm://10.0.41.113:5236?schema=FXKH_TXL
username: SYSDBA
password: SYSDBA001
druid:
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT1FROMDUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
filters: stat,wall,log4j #wall表示排除防火请
logSlowSql: true
#jpa配置
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.DmDialect
# Redis
redis:
host: 10.0.41.112
port: 6379
password: 1234567a
database: 4
servlet:
multipart:
max-file-size: 1100MB
max-request-size: 1100MB
knife4j:
enable: true
setting:
enableFooter: false
enableFooterCustom: true
footerCustomContent: Copyright 2018-[湖北纬皓端成科技有限公司](http://www.wavehorizon.cn)
documents: # 文档配置,可配置多个分组
- group: doc-knife4j-1.0.0
name: MarkDown文档
locations: classpath:markdown/*
- group: v1.0
name: v1.0
logging:
level.org.springframework.boot.autoconfigure: error #spring的自动装配日志只打error否则debug输出的会打印很多自动装配的log信息到控制台
config: classpath:logback-spring.xml
mybatis-plus:
global-config:
db-config:
update-strategy: not_empty
insert-strategy: not_empty
wx:
miniapp:
configs:
appid: wxb9b07668d1ba20fe
secret: 99a1b89ac30e28bcc9bba8be973027f4
#getGroupWarning: http://223.75.53.141:8000/shzh/met/zyqxfw/api/warning/getGroupWarning
getGroupWarning: http://127.0.0.1:20000/shzh/met/zyqxfw/api/warning/getGroupWarning
autocall:
sysUserId: HBSL01
processId: 1952550108058906626
# processId: 1934801506242949122
# callerGroup: 02160980358
callerGroup: 02759325005
secret: yxt@2024-1234567
sms:
url: http://120.55.193.51:8098/smtp/http/submit
userName: hbfx15
serviceCode: hbfx15
userPassword: hbfx15