Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
browser-backend
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
browser-backend
Commits
90d548b4
Commit
90d548b4
authored
Apr 09, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ip过期短信
parent
c36fac64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
IpResourceRepository.java
...owserbackend/browser/repository/IpResourceRepository.java
+1
-1
ExpireSoonWarn.java
...com/edgec/browserbackend/browser/task/ExpireSoonWarn.java
+6
-4
No files found.
src/main/java/com/edgec/browserbackend/browser/repository/IpResourceRepository.java
View file @
90d548b4
...
@@ -28,7 +28,7 @@ public interface IpResourceRepository extends MongoRepository<IpResource, String
...
@@ -28,7 +28,7 @@ public interface IpResourceRepository extends MongoRepository<IpResource, String
List
<
IpResource
>
findByStatusAndLockedAndLockTimestampLessThan
(
int
status
,
boolean
locked
,
long
timestamp
);
List
<
IpResource
>
findByStatusAndLockedAndLockTimestampLessThan
(
int
status
,
boolean
locked
,
long
timestamp
);
List
<
IpResource
>
findByValidTimeBetween
(
long
beginTime
,
long
endTime
);
List
<
IpResource
>
findByValidTimeBetween
AndIsDeleted
(
long
beginTime
,
long
endTime
,
boolean
isDeleted
);
IpResource
findByShopIdAndIsDeleted
(
String
shopId
,
boolean
isDeleted
);
IpResource
findByShopIdAndIsDeleted
(
String
shopId
,
boolean
isDeleted
);
...
...
src/main/java/com/edgec/browserbackend/browser/task/ExpireSoonWarn.java
View file @
90d548b4
...
@@ -34,13 +34,15 @@ public class ExpireSoonWarn {
...
@@ -34,13 +34,15 @@ public class ExpireSoonWarn {
private
void
sendExpiredIpAccount
(
int
day
)
{
private
void
sendExpiredIpAccount
(
int
day
)
{
List
<
IpResource
>
ipResources
=
null
;
List
<
IpResource
>
ipResources
=
null
;
if
(
day
==
7
)
{
if
(
day
==
7
)
{
ipResources
=
ipResourceRepository
.
findByValidTimeBetween
(
ipResources
=
ipResourceRepository
.
findByValidTimeBetween
AndIsDeleted
(
Instant
.
now
().
atZone
(
ZoneOffset
.
UTC
).
plusDays
(
day
-
1
).
toEpochSecond
()
*
1000
,
Instant
.
now
().
atZone
(
ZoneOffset
.
UTC
).
plusDays
(
day
-
1
).
toEpochSecond
()
*
1000
,
Instant
.
now
().
atZone
(
ZoneOffset
.
UTC
).
plusDays
(
day
).
toEpochSecond
()
*
1000
);
Instant
.
now
().
atZone
(
ZoneOffset
.
UTC
).
plusDays
(
day
).
toEpochSecond
()
*
1000
,
false
);
}
else
{
}
else
{
ipResources
=
ipResourceRepository
.
findByValidTimeBetween
(
ipResources
=
ipResourceRepository
.
findByValidTimeBetween
AndIsDeleted
(
Instant
.
now
().
atZone
(
ZoneOffset
.
UTC
).
minusDays
(
1
).
toEpochSecond
()
*
1000
,
Instant
.
now
().
atZone
(
ZoneOffset
.
UTC
).
minusDays
(
1
).
toEpochSecond
()
*
1000
,
Instant
.
now
().
atZone
(
ZoneOffset
.
UTC
).
plusDays
(
day
).
toEpochSecond
()
*
1000
);
Instant
.
now
().
atZone
(
ZoneOffset
.
UTC
).
plusDays
(
day
).
toEpochSecond
()
*
1000
,
false
);
}
}
if
(
ipResources
!=
null
&&
ipResources
.
size
()
>
0
)
{
if
(
ipResources
!=
null
&&
ipResources
.
size
()
>
0
)
{
...
...
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