Commit 11177d76 by 罗志长

优化

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