Commit ed18ff1e by 杨林龙

添加打印日志

1 parent 76213420
...@@ -3,6 +3,7 @@ package cn.com.glsx.schedulerjob.task.modules.service; ...@@ -3,6 +3,7 @@ package cn.com.glsx.schedulerjob.task.modules.service;
import cn.com.glsx.stdinterface.api.StatisticsDriveClient; import cn.com.glsx.stdinterface.api.StatisticsDriveClient;
import cn.com.glsx.stdinterface.dto.StatisticsDriveDto; import cn.com.glsx.stdinterface.dto.StatisticsDriveDto;
import cn.hutool.core.collection.CollectionUtil;
import com.glsx.plat.core.web.R; import com.glsx.plat.core.web.R;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -23,8 +24,10 @@ public class MySimpleJobService { ...@@ -23,8 +24,10 @@ public class MySimpleJobService {
private StatisticsDriveClient statisticsDriveClient; private StatisticsDriveClient statisticsDriveClient;
public void statisticsDriveDataEveryDay() { public void statisticsDriveDataEveryDay() {
log.info("开始统计数据===");
R statisticsDriveR = statisticsDriveClient.statisticsDriveDataEveryDay(); R statisticsDriveR = statisticsDriveClient.statisticsDriveDataEveryDay();
if (statisticsDriveR == null) { if (statisticsDriveR == null) {
log.info("statisticsDriveR is null");
return; return;
} }
...@@ -32,6 +35,11 @@ public class MySimpleJobService { ...@@ -32,6 +35,11 @@ public class MySimpleJobService {
}.getType()); }.getType());
// 调用标准接口 将数据入库 // 调用标准接口 将数据入库
if (CollectionUtil.isEmpty(statisticsDriveDtoList)) {
log.info("statisticsDriveDtoList is null");
return;
}
log.info("开始保存数据===,数据集合的大小为" + statisticsDriveDtoList.size()); log.info("开始保存数据===,数据集合的大小为" + statisticsDriveDtoList.size());
statisticsDriveClient.insertStatisticsDriveList(statisticsDriveDtoList); statisticsDriveClient.insertStatisticsDriveList(statisticsDriveDtoList);
} }
......
...@@ -14,7 +14,7 @@ import java.util.Date; ...@@ -14,7 +14,7 @@ import java.util.Date;
@Slf4j @Slf4j
@Component @Component
@ElasticSimpleJob(jobName = "MySimpleJob", cron = "0 15 5 * * ?") @ElasticSimpleJob(jobName = "MySimpleJob", cron = "0 10 10 * * ?")
public class MySimpleJob implements SimpleJob { public class MySimpleJob implements SimpleJob {
@Autowired @Autowired
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!