Commit 409f25ad authored by lisong's avatar lisong

添加气瓶数据同步定时任务

parent a7850ad4
......@@ -11,9 +11,11 @@ import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderInfo;
import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylCylinderFillingCheckMapper;
import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderFillingCheckMapper;
import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderInfoMapper;
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StopWatch;
......@@ -38,6 +40,8 @@ public class CylSyncServiceImpl {
@Autowired
private CylCylinderFillingCheckMapper cylCylinderFillingCheckMapper;
@Scheduled(cron = "0 0 1 * * ?")
@SchedulerLock(name = "syncFillingCheckInfo", lockAtMostFor = "PT10H", lockAtLeastFor = "PT60M")
public void syncFillingCheckInfo() {
// Integer totalSize = sourceFillingCheckServiceImpl.getFillCheckListTotal();
// Integer times;
......@@ -125,6 +129,8 @@ public class CylSyncServiceImpl {
}
}
@Scheduled(cron = "0 0 1 * * ?")
@SchedulerLock(name = "fillingSync", lockAtMostFor = "PT10H", lockAtLeastFor = "PT60M")
public Object fillingSync() {
try {
StopWatch stopWatch = new StopWatch();
......@@ -227,7 +233,8 @@ public class CylSyncServiceImpl {
}
@Scheduled(cron = "0 0 1 * * ?")
@SchedulerLock(name = "fillingRecordSync", lockAtMostFor = "PT10H", lockAtLeastFor = "PT60M")
public String fillingRecordSync() {
// StopWatch stopWatch = new StopWatch();
// stopWatch.start();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment