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
b38dff3e
Commit
b38dff3e
authored
Mar 20, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ip状态bug
parent
207d6de0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
30 deletions
+34
-30
IpResourceServiceImpl.java
...erbackend/browser/service/Impl/IpResourceServiceImpl.java
+34
-30
No files found.
src/main/java/com/edgec/browserbackend/browser/service/Impl/IpResourceServiceImpl.java
View file @
b38dff3e
...
@@ -472,21 +472,23 @@ public class IpResourceServiceImpl implements IpResourceService {
...
@@ -472,21 +472,23 @@ public class IpResourceServiceImpl implements IpResourceService {
else
else
shopDto
=
new
ShopDto
();
shopDto
=
new
ShopDto
();
}
}
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
plusSeconds
(
60
*
60
*
24
*
7
).
toEpochMilli
()
&&
x
.
getValidTime
()
>
Instant
.
now
().
toEpochMilli
())
{
if
(
StringUtils
.
isNotBlank
(
x
.
getAddr
()))
{
x
.
setStatus
(
2
);
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
plusSeconds
(
60
*
60
*
24
*
7
).
toEpochMilli
()
&&
x
.
getValidTime
()
>
Instant
.
now
().
toEpochMilli
())
{
ipResourceRepository
.
save
(
x
);
x
.
setStatus
(
2
);
}
ipResourceRepository
.
save
(
x
);
else
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
minusSeconds
(
60
*
60
*
24
*
7
).
toEpochMilli
())
{
}
deleteIp
(
username
,
Arrays
.
asList
(
x
.
getAddr
()));
else
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
minusSeconds
(
60
*
60
*
24
*
7
).
toEpochMilli
())
{
return
;
deleteIp
(
username
,
Arrays
.
asList
(
x
.
getAddr
()));
}
return
;
else
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
toEpochMilli
())
{
}
x
.
setStatus
(
1
);
else
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
toEpochMilli
())
{
ipResourceRepository
.
save
(
x
);
x
.
setStatus
(
1
);
}
ipResourceRepository
.
save
(
x
);
else
{
}
x
.
setStatus
(
0
);
else
{
ipResourceRepository
.
save
(
x
);
x
.
setStatus
(
0
);
ipResourceRepository
.
save
(
x
);
}
}
}
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
));
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
));
});
});
...
@@ -503,21 +505,23 @@ public class IpResourceServiceImpl implements IpResourceService {
...
@@ -503,21 +505,23 @@ public class IpResourceServiceImpl implements IpResourceService {
else
else
shopDto
=
new
ShopDto
();
shopDto
=
new
ShopDto
();
}
}
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
plusSeconds
(
60
*
60
*
24
*
7
).
toEpochMilli
()
&&
x
.
getValidTime
()
>
Instant
.
now
().
toEpochMilli
())
{
if
(
StringUtils
.
isNotBlank
(
x
.
getAddr
()))
{
x
.
setStatus
(
2
);
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
plusSeconds
(
60
*
60
*
24
*
7
).
toEpochMilli
()
&&
x
.
getValidTime
()
>
Instant
.
now
().
toEpochMilli
())
{
ipResourceRepository
.
save
(
x
);
x
.
setStatus
(
2
);
}
ipResourceRepository
.
save
(
x
);
else
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
minusSeconds
(
60
*
60
*
24
*
7
).
toEpochMilli
())
{
}
deleteIp
(
username
,
Arrays
.
asList
(
x
.
getAddr
()));
else
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
minusSeconds
(
60
*
60
*
24
*
7
).
toEpochMilli
())
{
return
;
deleteIp
(
username
,
Arrays
.
asList
(
x
.
getAddr
()));
}
return
;
else
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
toEpochMilli
())
{
}
x
.
setStatus
(
1
);
else
if
(
x
.
getValidTime
()
<=
Instant
.
now
().
toEpochMilli
())
{
ipResourceRepository
.
save
(
x
);
x
.
setStatus
(
1
);
}
ipResourceRepository
.
save
(
x
);
else
{
}
x
.
setStatus
(
0
);
else
{
ipResourceRepository
.
save
(
x
);
x
.
setStatus
(
0
);
ipResourceRepository
.
save
(
x
);
}
}
}
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
));
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
));
});
});
...
...
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