Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neo4jRelation
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
qiuchaofei
neo4jRelation
Commits
e4540a48
Commit
e4540a48
authored
Jan 19, 2022
by
qiuchaofei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改从mongo取数的分页方法
parent
6cf3606a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
MetadataServiceImpl.java
...ta/metadataRelation/service/impl/MetadataServiceImpl.java
+12
-3
No files found.
src/main/java/com/keymobile/metadata/metadataRelation/service/impl/MetadataServiceImpl.java
View file @
e4540a48
...
...
@@ -1464,7 +1464,10 @@ public class MetadataServiceImpl implements IMetadataService {
//根据schema获取表级数据,再按照类型分类:表,视图,作业,函数等
int
page
=
0
,
pageSize
=
300
;
long
totalElement
=
mongoDbServiceImpl
.
countDocumentByParentId
(
PageRequest
.
of
(
page
,
pageSize
),
catalogName
,
schemaId
);
for
(;
page
<
totalElement
;
page
+=
pageSize
){
int
totalPageCount
=
((
int
)
totalElement
/
pageSize
)+
1
;
for
(;
page
<
totalPageCount
;
page
++
){
List
<
Document
>
tableDocumentList
=
mongoDbServiceImpl
.
getDocumentByparentIdByPage
(
PageRequest
.
of
(
page
,
pageSize
,
Sort
.
by
(
"_id"
)),
catalogName
,
schemaId
);
for
(
Document
tableDocument
:
tableDocumentList
){
String
metadataId
=(
String
)
tableDocument
.
get
(
"_id"
);
...
...
@@ -1656,7 +1659,11 @@ public class MetadataServiceImpl implements IMetadataService {
Map
<
String
,
String
>
edgeIdMap
=
new
HashMap
<>();
int
page
=
0
,
pageSize
=
300
;
long
totalElement
=
mongoDbServiceImpl
.
countRelation
(
PageRequest
.
of
(
page
,
pageSize
),
catalogName
);
for
(;
page
<
totalElement
;
page
+=
pageSize
){
int
totalPageCount
=
((
int
)
totalElement
/
pageSize
)+
1
;
for
(;
page
<
totalPageCount
;
page
++){
List
<
Document
>
relationList
=
mongoDbServiceImpl
.
findRelationByPage
(
PageRequest
.
of
(
page
,
pageSize
,
Sort
.
by
(
"_id"
)),
catalogName
);
for
(
Document
relation
:
relationList
){
...
...
@@ -2257,7 +2264,9 @@ public class MetadataServiceImpl implements IMetadataService {
int
page
=
0
,
pageSize
=
500
;
long
totalElement
=
mongoDbServiceImpl
.
countTempRelation
(
PageRequest
.
of
(
page
,
pageSize
),
catalogName
);
Map
<
String
,
Long
>
nameIdMap
=
new
HashMap
<>();
for
(;
page
<
totalElement
;
page
+=
pageSize
)
{
int
totalPageCount
=
((
int
)
totalElement
/
pageSize
)+
1
;
for
(;
page
<
totalPageCount
;
page
++)
{
List
<
Document
>
list
=
mongoDbServiceImpl
.
findTempRelationByPage
(
PageRequest
.
of
(
page
,
pageSize
,
Sort
.
by
(
"etlJobId"
)),
catalogName
);
for
(
Document
relation
:
list
)
{
String
sqlId
=
relation
.
getString
(
"etlSqlId"
);
...
...
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