|
@@ -1,5 +1,7 @@
|
|
|
package com.metro.service.job;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.metro.mapper.DataShowMapper;
|
|
|
import com.metro.mapper.JPersonsMapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
@@ -7,7 +9,6 @@ import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
-import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import javax.annotation.Resource;
|
|
@@ -27,15 +28,18 @@ public class JperSonTask {
|
|
|
@Resource
|
|
|
@Lazy
|
|
|
private JPersonsMapper jPersonsMapper;
|
|
|
+ @Resource
|
|
|
+ @Lazy
|
|
|
+ private DataShowMapper dataShowMapper;
|
|
|
|
|
|
/*
|
|
|
* 因为地铁盘查生产的admin的companyId和branchId是null
|
|
|
* */
|
|
|
- @Scheduled(cron = "0 0 0 * * ?", zone = "Asia/Shanghai")
|
|
|
@PostConstruct
|
|
|
@Async
|
|
|
public void dailyDataStatistics() {
|
|
|
log.info("----------开始------数据初始化-------------");
|
|
|
+ dataShowMapper.delete(new LambdaQueryWrapper<>());
|
|
|
jPersonsMapper.updateJperson();
|
|
|
jPersonsMapper.updateJperson1();
|
|
|
log.info("----------完成------数据初始化-------------");
|