Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gong-an
Project
Project
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
Administrator
gong-an
Commits
54051d7a
Commit
54051d7a
authored
Nov 12, 2021
by
wuqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2021/11/12 吴卿华 修改两人查询时 可能会出现死循环问题
parent
85d0b27c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
TransferRelationshipServiceImpl.java
.../service/serviceImpl/TransferRelationshipServiceImpl.java
+14
-5
No files found.
src/main/java/com/example/gajz/transferrelationship/service/serviceImpl/TransferRelationshipServiceImpl.java
View file @
54051d7a
...
...
@@ -722,8 +722,17 @@ public class TransferRelationshipServiceImpl implements TransferRelationshipServ
hashMap1
.
put
(
searchRelationshipSubordinateVo
.
getCardNumber
(),
searchRelationshipSubordinateVo
.
getCardNumber
());
for
(
int
b
=
0
;
b
<
1
;)
{
for
(
int
a
=
0
;
a
<
superiorList
.
size
();
a
++)
{
//查询上级转账人方法
List
<
SearchRelationshipVo
>
superior
=
transferRelationshipMapper
.
querySuperior
(
superiorList
.
get
(
a
).
getCardNumber
());
//存放查询出来的上级信息
List
<
SearchRelationshipVo
>
superior
=
new
ArrayList
<>();
//循环查询出来的上级信息 之后将查出来的上级信息存入到list中
for
(
int
m
=
0
;
m
<
superiorList
.
size
();
m
++){
//查询上级转账人方法
List
<
SearchRelationshipVo
>
superior1
=
transferRelationshipMapper
.
querySuperior
(
superiorList
.
get
(
m
).
getCardNumber
());
for
(
int
j
=
0
;
j
<
superior1
.
size
();
j
++){
superior
.
add
(
superior1
.
get
(
j
));
}
}
//清空list数据
superiorList
.
clear
();
//判断上级是否是转账人 如果是 就直接返回数据
...
...
@@ -746,14 +755,14 @@ public class TransferRelationshipServiceImpl implements TransferRelationshipServ
searchRelationshipSubordinateVo1
.
setColor
(
colour
.
getColour
());
searchRelationshipSubordinateVo1
.
setSize
(
10
);
searchRelationshipSubordinateVo1
.
setHierarchy
(
searchRelationshipVoList
.
get
(
k
).
getHierarchy
());
searchRelationshipSubordinateVo1
.
setSubordinateQuantity
(
searchRelationshipVoList
.
get
(
k
).
getSubordinateQuantity
());
searchRelationshipSubordinateVo1
.
setSubordinateQuantity
(
searchRelationshipVoList
.
get
(
k
).
getSubordinateQuantity
());
Object
Number
=
hashMap1
.
get
(
superior
.
get
(
n
).
getCardNumber
());
if
(
Number
==
null
){
//添加被转账人信息
transferAssociationList
.
add
(
searchRelationshipSubordinateVo1
);
//向防止重复map添加已经查询到的上级卡号
hashMap1
.
put
(
superior
.
get
(
n
).
getCardNumber
(),
superior
.
get
(
n
).
getCardNumber
());
}
//向防止重复map添加已经查询到的上级卡号
hashMap1
.
put
(
superior
.
get
(
n
).
getCardNumber
(),
superior
.
get
(
n
).
getCardNumber
());
superiorList
.
add
(
searchRelationshipSubordinateVo1
);
}
}
...
...
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