Commit 11177d76 by 罗志长

优化

parent ec090b08
......@@ -57,18 +57,18 @@ public class DeviceCacheUtil implements ApplicationRunner {
}
public PlatDevice get(String oriDeviceIdAndIotOrgId) {
PlatDevice platDevice = RedisUtil.get(RedisConst.PLAT_IOT_DEVICE_PREFIX + oriDeviceIdAndIotOrgId);
if(platDevice==null){
getAll();
}
// PlatDevice platDevice = RedisUtil.get(RedisConst.PLAT_IOT_DEVICE_PREFIX + oriDeviceIdAndIotOrgId);
// if(platDevice==null){
// getAll();
// }
return RedisUtil.get(RedisConst.PLAT_IOT_DEVICE_PREFIX + oriDeviceIdAndIotOrgId);
}
public List<PlatDevice> getByDeviceId(String oriDeviceId) {
List<PlatDevice> platDevice = RedisUtil.getLike(RedisConst.PLAT_IOT_DEVICE_PREFIX + oriDeviceId);
if (CollUtil.isEmpty(platDevice)) {
getAll();
}
// List<PlatDevice> platDevice = RedisUtil.getLike(RedisConst.PLAT_IOT_DEVICE_PREFIX + oriDeviceId);
// if (CollUtil.isEmpty(platDevice)) {
// getAll();
// }
return RedisUtil.getLike(RedisConst.PLAT_IOT_DEVICE_PREFIX + oriDeviceId);
}
......
......@@ -5,6 +5,7 @@ server:
charset: UTF-8
force: true
enabled: true
shutdown: graceful
spring:
application:
......@@ -60,7 +61,7 @@ sign:
# - auth/checkCode
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
file:
......
......@@ -5,6 +5,7 @@ server:
charset: UTF-8
force: true
enabled: true
shutdown: graceful
spring:
application:
......
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 sign in to comment