Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
0a2885e0
Commit
0a2885e0
authored
Dec 14, 2020
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/listUtil' into 'master'
bug:[none]优化方法 See merge request rays/pcloud-common-parent!168
parents
6b3c8f6c
5585ed7a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
ListUtils.java
...mmon/src/main/java/com/pcloud/common/utils/ListUtils.java
+6
-6
No files found.
pcloud-common/src/main/java/com/pcloud/common/utils/ListUtils.java
View file @
0a2885e0
...
@@ -74,18 +74,18 @@ public class ListUtils {
...
@@ -74,18 +74,18 @@ public class ListUtils {
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
HashSet
<
Long
>
idSet
=
new
HashSet
<>(
idList
);
HashSet
<
Long
>
idSet
=
new
HashSet
<>(
idList
);
idList
.
clear
();
List
<
Long
>
newList
=
new
ArrayList
<>
();
id
List
.
addAll
(
idSet
);
new
List
.
addAll
(
idSet
);
List
<
T
>
result
=
new
ArrayList
<>();
List
<
T
>
result
=
new
ArrayList
<>();
if
(
id
List
.
size
()>
500
){
if
(
new
List
.
size
()>
500
){
List
<
List
<
Long
>>
lists
=
groupList
(
id
List
);
List
<
List
<
Long
>>
lists
=
groupList
(
new
List
);
for
(
List
<
Long
>
list
:
lists
)
{
for
(
List
<
Long
>
list
:
lists
)
{
List
<
T
>
tempList
=
listForInSQL
.
processSQL
(
list
);
List
<
T
>
tempList
=
listForInSQL
.
processSQL
(
list
);
result
.
addAll
(
tempList
);
result
.
addAll
(
tempList
);
}
}
return
result
;
return
result
;
}
else
if
(
id
List
.
size
()>
0
){
}
else
if
(
new
List
.
size
()>
0
){
return
listForInSQL
.
processSQL
(
id
List
);
return
listForInSQL
.
processSQL
(
new
List
);
}
else
{
}
else
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
...
...
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