From 2466d6c4690efdb9520e15c0baee41486697f4fe Mon Sep 17 00:00:00 2001 From: lyf66 Date: Tue, 29 Nov 2022 17:17:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B8=97=E6=B5=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=85=AC=E5=BC=8F=E8=AE=A1=E7=AE=97=E7=9A=84=E5=8D=95?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../whdc/zhdbaqapi/component/ScheduledTask.java | 6 +++--- .../service/impl/DeviceSLInfoServiceimpl.java | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) 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(); }