job:test job
This commit is contained in:
parent
80c358d808
commit
06de775ac7
@ -0,0 +1,26 @@
|
||||
package com.ensign.crm.module.crm.job;
|
||||
|
||||
import com.ensign.crm.framework.quartz.core.handler.JobHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @Date: 2024/10/9 15:54
|
||||
* @Created: by ZZSLL
|
||||
*/
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class TestLogOutputTask implements JobHandler {
|
||||
@Override
|
||||
public String execute(String param) throws Exception {
|
||||
log.info(Thread.currentThread().getName());
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
log.info(sdf.format(new Date()));
|
||||
return "success";
|
||||
}
|
||||
}
|
@ -3,6 +3,7 @@ package com.ensign.crm.module.crm.job;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ensign.crm.framework.common.enums.CommonStatusEnum;
|
||||
import com.ensign.crm.framework.quartz.core.handler.JobHandler;
|
||||
import com.ensign.crm.framework.tenant.core.aop.TenantIgnore;
|
||||
import com.ensign.crm.module.crm.exception.AllKingdeeException;
|
||||
@ -73,6 +74,11 @@ public class UserSyncKingdeeTask implements JobHandler {
|
||||
errors.add(user);
|
||||
log.error("异常数据");
|
||||
}
|
||||
|
||||
if (successCount == 1) {
|
||||
user.setIsSyncKingdee(CommonStatusEnum.ENABLE.getStatus());
|
||||
userMapper.updateById(user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ spring:
|
||||
autoconfigure:
|
||||
exclude:
|
||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
||||
- org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration # 默认 local 环境,不开启 Quartz 的自动配置
|
||||
# - org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration # 默认 local 环境,不开启 Quartz 的自动配置
|
||||
- de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
|
||||
- de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration # 禁用 Spring Boot Admin 的 Server UI 的自动配置
|
||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
||||
|
Loading…
Reference in New Issue
Block a user