调整定时任务时间

master
wjt 1 year ago
parent 8384dc6aad
commit 31452a3e53

@ -48,16 +48,16 @@ public class TfSourceTask {
private String path; private String path;
/** /**
* 23 30 * 1
* <p> * <p>
* *
*/ */
@Scheduled(cron = "0 30 23 * * ? ") @Scheduled(cron = "0 0 1 * * ? ")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void tfSource() { public void tfSource() {
log.info("++++++++++++++++++++++TfSource Sync start time {} ++++++++++++++++", DateUtil.now()); log.info("++++++++++++++++++++++TfSource Sync start time {} ++++++++++++++++", DateUtil.now());
String startTime = DateUtil.format(DateUtil.date(), "yyyy-MM-dd 00:00:00"); String startTime = DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd 00:00:00");
String endTime = DateUtil.format(DateUtil.date(), "yyyy-MM-dd 23:59:59"); String endTime = DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd 23:59:59");
List<TfSourceDTO> list = new ArrayList<>(); List<TfSourceDTO> list = new ArrayList<>();
//jlv2 //jlv2
obtainDateByJlV2(startTime, endTime, list); obtainDateByJlV2(startTime, endTime, list);
@ -76,7 +76,7 @@ public class TfSourceTask {
//tag分组 //tag分组
HashMap<String, List<TfSourceDTO>> mapByTag = new HashMap<>(list.stream().collect(Collectors.groupingBy(TfSourceDTO::getTag, Collectors.toList()))); HashMap<String, List<TfSourceDTO>> mapByTag = new HashMap<>(list.stream().collect(Collectors.groupingBy(TfSourceDTO::getTag, Collectors.toList())));
String format = DateUtil.format(DateUtil.date(), "yyyy-MM-dd"); String format = DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd");
List<TbTfSourceEntity> saveList = new ArrayList<>(); List<TbTfSourceEntity> saveList = new ArrayList<>();
for (String tag : mapByTag.keySet()) { for (String tag : mapByTag.keySet()) {
String password = RandomUtil.randomString(6); String password = RandomUtil.randomString(6);
@ -92,6 +92,7 @@ public class TfSourceTask {
log.info("++++++++++++++++++++++TfSource Sync end time {} ++++++++++++++++", DateUtil.now()); log.info("++++++++++++++++++++++TfSource Sync end time {} ++++++++++++++++", DateUtil.now());
} }
/** /**
* *
* *

Loading…
Cancel
Save