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
c13dde3a
Commit
c13dde3a
authored
Jun 24, 2019
by
高鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mymaster' into 'master'
早晚报加个日志 See merge request rays/pcloud-book!24
parents
2e1024f7
f96ddbd7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
ESNewsBizImpl.java
.../main/java/com/pcloud/book/es/biz/impl/ESNewsBizImpl.java
+4
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/es/biz/impl/ESNewsBizImpl.java
View file @
c13dde3a
...
@@ -51,11 +51,15 @@ public class ESNewsBizImpl implements ESNewsBiz {
...
@@ -51,11 +51,15 @@ public class ESNewsBizImpl implements ESNewsBiz {
Integer
index
=
0
;
Integer
index
=
0
;
Integer
offset
=
10000
;
Integer
offset
=
10000
;
while
(
index
*
offset
<
count
)
{
while
(
index
*
offset
<
count
)
{
Date
date
=
new
Date
();
List
<
ESNews
>
list
=
newsDao
.
findAll
(
maxId
,
offset
);
List
<
ESNews
>
list
=
newsDao
.
findAll
(
maxId
,
offset
);
LOGGER
.
info
(
"查询10000用时"
+
(
new
Date
().
getTime
()
-
date
.
getTime
()));
if
(
ListUtils
.
isEmpty
(
list
))
{
if
(
ListUtils
.
isEmpty
(
list
))
{
break
;
break
;
}
}
Date
date1
=
new
Date
();
newsRepository
.
save
(
list
);
newsRepository
.
save
(
list
);
LOGGER
.
info
(
"插入es10000用时"
+
(
new
Date
().
getTime
()
-
date1
.
getTime
()));
maxId
=
Long
.
valueOf
(
list
.
get
(
list
.
size
()
-
1
).
getId
());
maxId
=
Long
.
valueOf
(
list
.
get
(
list
.
size
()
-
1
).
getId
());
LOGGER
.
info
(
"导入数据至"
+
maxId
);
LOGGER
.
info
(
"导入数据至"
+
maxId
);
index
+=
1
;
index
+=
1
;
...
...
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