增加定时任务线程池,增加定时任务执行时间节点
This commit is contained in:
parent
eac128abdd
commit
90b03048e2
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/.idea/
|
1
.idea/.gitignore
generated
vendored
1
.idea/.gitignore
generated
vendored
@ -6,3 +6,4 @@
|
|||||||
# Datasource local storage ignored files
|
# Datasource local storage ignored files
|
||||||
/dataSources/
|
/dataSources/
|
||||||
/dataSources.local.xml
|
/dataSources.local.xml
|
||||||
|
/.idea/*
|
||||||
|
20
.idea/jarRepositories.xml
generated
20
.idea/jarRepositories.xml
generated
@ -1,11 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="RemoteRepositoriesConfiguration">
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<option name="name" value="Central Repository" />
|
|
||||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="nexus-rootcloud" />
|
<option name="id" value="nexus-rootcloud" />
|
||||||
<option name="name" value="nexus-rootcloud" />
|
<option name="name" value="nexus-rootcloud" />
|
||||||
@ -16,6 +11,11 @@
|
|||||||
<option name="name" value="Central Repository" />
|
<option name="name" value="Central Repository" />
|
||||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Central Repository" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="jitpack.io" />
|
<option name="id" value="jitpack.io" />
|
||||||
<option name="name" value="jitpack.io" />
|
<option name="name" value="jitpack.io" />
|
||||||
@ -26,16 +26,16 @@
|
|||||||
<option name="name" value="jitpack.io" />
|
<option name="name" value="jitpack.io" />
|
||||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<option name="name" value="Maven Central repository" />
|
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="nexus-aliyun" />
|
<option name="id" value="nexus-aliyun" />
|
||||||
<option name="name" value="nexus-aliyun" />
|
<option name="name" value="nexus-aliyun" />
|
||||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="jboss.community" />
|
<option name="id" value="jboss.community" />
|
||||||
<option name="name" value="JBoss Community repository" />
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/ifsm-base.iml" filepath="$PROJECT_DIR$/.idea/ifsm-base.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -494,8 +494,8 @@ public class ServicePlanServiceImpl extends ServiceImpl<ServicePlanDao, ServiceP
|
|||||||
public void scheduledProcessing() {
|
public void scheduledProcessing() {
|
||||||
//获取当天日期
|
//获取当天日期
|
||||||
String thatDay = DateUtil.format(new Date(), DateUtil.PATTERN_CLASSICAL_SIMPLE);
|
String thatDay = DateUtil.format(new Date(), DateUtil.PATTERN_CLASSICAL_SIMPLE);
|
||||||
log.info("服务计划执行日期:{}" , thatDay);
|
|
||||||
List<ServicePlanVo> servicePlanVos = servicePlanMapper.selectExecutedServicePlan(thatDay);
|
List<ServicePlanVo> servicePlanVos = servicePlanMapper.selectExecutedServicePlan(thatDay);
|
||||||
|
log.info("服务计划执行日期:{},总执行条数:{}" , thatDay,servicePlanVos.size());
|
||||||
if (servicePlanVos.size() > 0) {
|
if (servicePlanVos.size() > 0) {
|
||||||
for (ServicePlanVo item : servicePlanVos) {
|
for (ServicePlanVo item : servicePlanVos) {
|
||||||
try {
|
try {
|
||||||
|
@ -16,7 +16,7 @@ import javax.annotation.Resource;
|
|||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@EnableScheduling
|
//@EnableScheduling
|
||||||
public class ServicePlanTimer {
|
public class ServicePlanTimer {
|
||||||
|
|
||||||
@Resource(name = "servicePlanServiceImpl")
|
@Resource(name = "servicePlanServiceImpl")
|
||||||
@ -26,7 +26,7 @@ public class ServicePlanTimer {
|
|||||||
/**
|
/**
|
||||||
* 定时处理设置了触发条件为系统时间的
|
* 定时处理设置了触发条件为系统时间的
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 0 5,6,7,8,14 * * ?")
|
@Scheduled(cron = "0 * 5,6,7,8,9,10,11,12,14 * * ?")
|
||||||
public void scheduledProcessing(){
|
public void scheduledProcessing(){
|
||||||
log.info("服务计划自动触发定时任务开始....");
|
log.info("服务计划自动触发定时任务开始....");
|
||||||
planService.scheduledProcessing();
|
planService.scheduledProcessing();
|
||||||
|
@ -28,7 +28,7 @@ spring:
|
|||||||
configuration:
|
configuration:
|
||||||
#设置当查询结果值为null时,同样映射该查询字段给map。
|
#设置当查询结果值为null时,同样映射该查询字段给map。
|
||||||
call-setters-on-nulls: true
|
call-setters-on-nulls: true
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
mapper-locations: classpath:/mapper/*.xml
|
mapper-locations: classpath:/mapper/*.xml
|
||||||
redis:
|
redis:
|
||||||
host: ${REDISHOST}
|
host: ${REDISHOST}
|
||||||
@ -57,6 +57,10 @@ spring:
|
|||||||
enabled: false
|
enabled: false
|
||||||
messages:
|
messages:
|
||||||
basename: i18n/messages/messages
|
basename: i18n/messages/messages
|
||||||
|
task:
|
||||||
|
scheduling:
|
||||||
|
pool:
|
||||||
|
size: 5
|
||||||
|
|
||||||
pagehelper:
|
pagehelper:
|
||||||
helper-dialect: mysql
|
helper-dialect: mysql
|
||||||
|
@ -40,7 +40,7 @@ spring:
|
|||||||
configuration:
|
configuration:
|
||||||
#设置当查询结果值为null时,同样映射该查询字段给map。
|
#设置当查询结果值为null时,同样映射该查询字段给map。
|
||||||
call-setters-on-nulls: true
|
call-setters-on-nulls: true
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
mapper-locations: classpath:/mapper/*.xml
|
mapper-locations: classpath:/mapper/*.xml
|
||||||
redis:
|
redis:
|
||||||
# host: 10.70.25.113
|
# host: 10.70.25.113
|
||||||
|
Loading…
x
Reference in New Issue
Block a user