diff --git a/src/main/java/com/whdc/zhdbaqapi/component/ScheduledTask.java b/src/main/java/com/whdc/zhdbaqapi/component/ScheduledTask.java index 86ec50c..b956dbd 100644 --- a/src/main/java/com/whdc/zhdbaqapi/component/ScheduledTask.java +++ b/src/main/java/com/whdc/zhdbaqapi/component/ScheduledTask.java @@ -22,9 +22,9 @@ public class ScheduledTask { String OS = System.getProperty("os.name").toLowerCase(); // 简单粗暴的判断,在 linux 环境下运行时,为生成环境 -// if (OS.contains("linux")) { -// iDeviceDataService.syncData(); + if (OS.contains("linux")) { + iDeviceDataService.syncData(); iDeviceSLDataService.syncData(); -// } + } } } diff --git a/src/main/java/com/whdc/zhdbaqapi/service/impl/DeviceSLInfoServiceimpl.java b/src/main/java/com/whdc/zhdbaqapi/service/impl/DeviceSLInfoServiceimpl.java index 6ab0f58..b884e9b 100644 --- a/src/main/java/com/whdc/zhdbaqapi/service/impl/DeviceSLInfoServiceimpl.java +++ b/src/main/java/com/whdc/zhdbaqapi/service/impl/DeviceSLInfoServiceimpl.java @@ -15,8 +15,8 @@ import com.whdc.zhdbaqapi.service.IDeviceSLInfoService; import com.whdc.zhdbaqapi.utils.DataUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -56,7 +56,7 @@ public class DeviceSLInfoServiceimpl extends ServiceImpl listAll() { return baseMapper.listAll(); }