Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
signal
traffic-signal-platform
Commits
821235e6
Commit
821235e6
authored
Mar 07, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 实时监控->路口关联缓存优化
parent
da754aed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
CrossRidInfoCache.java
.../src/main/java/net/wanji/opt/cache/CrossRidInfoCache.java
+17
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/cache/CrossRidInfoCache.java
View file @
821235e6
...
...
@@ -28,10 +28,20 @@ public class CrossRidInfoCache implements CommandLineRunner {
private
static
List
<
RidInfoEntity
>
ridInfoList
=
new
ArrayList
<>();
/**
* 获取所有路口关联列表
* @return
*/
public
List
<
RidInfoEntity
>
getRidInfoAllList
()
{
return
ridInfoList
;
}
/**
* 通过上下游路口编号获取关联路口列表
* @param startCrossId
* @param endCrossId
* @return
*/
public
List
<
RidInfoEntity
>
getRidInfoListByCrossId
(
String
startCrossId
,
String
endCrossId
)
{
Stream
<
RidInfoEntity
>
stream
=
ridInfoList
.
stream
();
if
(
StringUtils
.
isNotBlank
(
startCrossId
))
{
...
...
@@ -43,6 +53,13 @@ public class CrossRidInfoCache implements CommandLineRunner {
return
stream
.
collect
(
Collectors
.
toList
());
}
/**
* 刷新缓存
*/
public
void
refresh
()
{
init
();
}
@Override
public
void
run
(
String
...
args
)
throws
Exception
{
init
();
...
...
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