Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
11177d76
authored
Jan 22, 2024
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化
parent
ec090b08
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
server-service/src/main/java/com/makeit/utils/DeviceCacheUtil.java
server-web/src/main/resources/application-dev.yml
server-web/src/main/resources/application-test.yml
server-service/src/main/java/com/makeit/utils/DeviceCacheUtil.java
View file @
11177d76
...
@@ -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
);
}
}
...
...
server-web/src/main/resources/application-dev.yml
View file @
11177d76
...
@@ -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.StdOut
Impl
log-impl
:
org.apache.ibatis.logging.
nologging.NoLogging
Impl
file
:
file
:
...
...
server-web/src/main/resources/application-test.yml
View file @
11177d76
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment