记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
844da3f6
Commit
844da3f6
authored
Feb 25, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push 去掉没到推送时间的
parent
3940582b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
KylinUpushServiceImpl.java
...net/service/kylin/service/impl/KylinUpushServiceImpl.java
+20
-3
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinUpushServiceImpl.java
View file @
844da3f6
...
@@ -11,6 +11,9 @@ import org.springframework.data.mongodb.core.MongoTemplate;
...
@@ -11,6 +11,9 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Iterator
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
/**
/**
...
@@ -50,7 +53,15 @@ public class KylinUpushServiceImpl {
...
@@ -50,7 +53,15 @@ public class KylinUpushServiceImpl {
}
else
{
}
else
{
LinkedList
<
AdminUpushVo
>
pushList
=
(
LinkedList
<
AdminUpushVo
>)
adminUpushVo
;
LinkedList
<
AdminUpushVo
>
pushList
=
(
LinkedList
<
AdminUpushVo
>)
adminUpushVo
;
Integer
num
=
0
;
Integer
num
=
0
;
for
(
AdminUpushVo
info
:
pushList
)
{
for
(
Iterator
<
AdminUpushVo
>
it
=
pushList
.
iterator
();
it
.
hasNext
();
)
{
AdminUpushVo
info
=
it
.
next
();
String
pushTime
=
info
.
getPushTime
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
LocalDateTime
pushTimeL
=
LocalDateTime
.
parse
(
pushTime
,
formatter
);
if
(
pushTimeL
.
isAfter
(
LocalDateTime
.
now
()))
{
it
.
remove
();
continue
;
}
if
(
num
==
0
)
{
if
(
num
==
0
)
{
redisUtil
.
set
(
KylinRedisConst
.
ADMIN_UPUSH_LIST_READ_UID
.
concat
(
uid
),
info
.
getUpushId
());
redisUtil
.
set
(
KylinRedisConst
.
ADMIN_UPUSH_LIST_READ_UID
.
concat
(
uid
),
info
.
getUpushId
());
}
}
...
@@ -92,13 +103,19 @@ public class KylinUpushServiceImpl {
...
@@ -92,13 +103,19 @@ public class KylinUpushServiceImpl {
Integer
num
=
0
;
Integer
num
=
0
;
String
pushId
=
(
String
)
obj
;
String
pushId
=
(
String
)
obj
;
for
(
AdminUpushVo
info
:
pushList
)
{
for
(
Iterator
<
AdminUpushVo
>
it
=
pushList
.
iterator
();
it
.
hasNext
();
)
{
AdminUpushVo
info
=
it
.
next
();
if
(
info
.
getUpushId
().
equals
(
pushId
))
{
if
(
info
.
getUpushId
().
equals
(
pushId
))
{
break
;
break
;
}
else
{
}
else
{
String
pushTime
=
info
.
getPushTime
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
LocalDateTime
pushTimeL
=
LocalDateTime
.
parse
(
pushTime
,
formatter
);
if
(
pushTimeL
.
isBefore
(
LocalDateTime
.
now
()))
{
num
++;
num
++;
}
}
}
}
}
return
num
;
return
num
;
}
}
}
}
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