定时任务报错判空

master
anthonywj 2 years ago
parent 174474071a
commit e97418dab1

@ -22,7 +22,6 @@ public interface IoOrderService {
IoOrderEntity findByBillNo(String billNO);
List<IoOrderEntity> findByStatus(String action, Integer status);
int insertOrder(IoOrderEntity orderEntity);

@ -64,6 +64,9 @@ public class CleanLogTask implements SchedulingConfigurer {
ScheduledRequest scheduledRequest = new ScheduledRequest();
scheduledRequest.setCronName("clean_log_task");
ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest);
if (scheduledEntity == null) {
return null;
}
String cron = scheduledEntity.getCron();
if (StrUtil.isBlank(cron)) {
log.error("清理日志定时任务参数未配置");

@ -4,9 +4,9 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://192.168.0.66:3364/udi_spms_wmd?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: Glxp@6066
password: 123456
hikari:
connection-timeout: 60000
maximum-pool-size: 20

Loading…
Cancel
Save