Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
fanxing3-integration
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 06c8b915
authored
Sep 22, 2022
by
毛树良
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
<fix>:设备数据缓存逻辑优化
1 parent
51ac3ca7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
fanxing-docking-gb1400/src/main/java/com/viontech/scheduled/DataCacheScheduled.java
fanxing-docking-gb1400/src/main/java/com/viontech/scheduled/DataCacheScheduled.java
View file @
06c8b91
...
...
@@ -34,7 +34,18 @@ public class DataCacheScheduled implements CommandLineRunner {
private
void
updateDeviceTollgateCache
()
{
log
.
info
(
"开始更新设备与卡口关系缓存数据"
);
//查询
int
offset
=
0
;
LaneModel
laneQry
=
new
LaneModel
();
List
<
LaneModel
>
laneModels
=
trafficEventService
.
selectLaneDatas
(
laneQry
);
if
(!
CollectionUtils
.
isEmpty
(
laneModels
))
{
for
(
LaneModel
laneModel
:
laneModels
)
{
try
{
deviceTollgateMap
.
put
(
laneModel
.
getApeID
(),
laneModel
.
getTollgateID
());
}
catch
(
Exception
e
)
{
log
.
error
(
"deviceTollgateMap.put Exception"
,
e
);
}
}
}
/*int offset = 0;
int limit = 50;
int selectSize = 0;
int num = 0;
...
...
@@ -55,7 +66,7 @@ public class DataCacheScheduled implements CommandLineRunner {
}
}
}
}
while
(
selectSize
>=
limit
);
} while (selectSize >= limit);
*/
log
.
info
(
"结束更新设备与卡口关系缓存,共更新{}条"
,
deviceTollgateMap
.
size
());
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment