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
d52056f5
Commit
d52056f5
authored
May 07, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专线ip debug
parent
dd95dd0f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
IpResourceRepository.java
...owserbackend/browser/repository/IpResourceRepository.java
+1
-1
Set3proxyTask.java
.../com/edgec/browserbackend/browser/task/Set3proxyTask.java
+4
-4
No files found.
src/main/java/com/edgec/browserbackend/browser/repository/IpResourceRepository.java
View file @
d52056f5
...
@@ -29,7 +29,7 @@ public interface IpResourceRepository extends MongoRepository<IpResource, String
...
@@ -29,7 +29,7 @@ public interface IpResourceRepository extends MongoRepository<IpResource, String
List
<
IpResource
>
findByIsDeletedAndShopIdInAndRegionCnLike
(
boolean
isDeleted
,
List
<
String
>
shopIds
,
String
regionCn
);
List
<
IpResource
>
findByIsDeletedAndShopIdInAndRegionCnLike
(
boolean
isDeleted
,
List
<
String
>
shopIds
,
String
regionCn
);
List
<
IpResource
>
findByOwnerInAndSpecialLine
(
List
<
String
>
owners
,
boolean
specialLine
);
List
<
IpResource
>
findByOwnerInAndSpecialLine
(
List
<
String
>
owners
,
boolean
specialLine
);
List
<
IpResource
>
findBySpecialLine
(
boolean
specialLine
);
List
<
IpResource
>
findBySpecialLine
AndIsDeleted
(
boolean
specialLine
,
boolean
isDeleted
);
List
<
IpResource
>
findByRegionInAndIsDeleted
(
List
<
String
>
regions
,
boolean
isDeleted
);
List
<
IpResource
>
findByRegionInAndIsDeleted
(
List
<
String
>
regions
,
boolean
isDeleted
);
...
...
src/main/java/com/edgec/browserbackend/browser/task/Set3proxyTask.java
View file @
d52056f5
...
@@ -53,10 +53,10 @@ public class Set3proxyTask {
...
@@ -53,10 +53,10 @@ public class Set3proxyTask {
if
(
Instant
.
now
().
toEpochMilli
()
<
proxyConfig
.
getTimestamp
())
if
(
Instant
.
now
().
toEpochMilli
()
<
proxyConfig
.
getTimestamp
())
return
;
return
;
}
}
List
<
String
>
tokenUsernames
=
mongoOAuth2AccessTokenRepository
.
findByCreatedAtGreaterThan
(
validTime
).
stream
().
map
(
MongoOAuth2AccessToken:
:
getUsername
).
collect
(
Collectors
.
toList
());
//
List<String> tokenUsernames = mongoOAuth2AccessTokenRepository.findByCreatedAtGreaterThan(validTime).stream().map(MongoOAuth2AccessToken::getUsername).collect(Collectors.toList());
List
<
String
>
accountParents
=
accountRepository
.
findByNameIn
(
tokenUsernames
).
stream
().
map
(
x
->
x
.
getParent
()
==
null
?
x
.
getName
()
:
x
.
getParent
()).
distinct
().
collect
(
Collectors
.
toList
());
//
List<String> accountParents = accountRepository.findByNameIn(tokenUsernames).stream().map(x -> x.getParent() == null ? x.getName() : x.getParent()).distinct().collect(Collectors.toList());
List
<
IpResource
>
ipResources
=
ipResourceRepository
.
findByOwnerInAndSpecialLine
(
accountParents
,
true
);
//
List<IpResource> ipResources = ipResourceRepository.findByOwnerInAndSpecialLine(accountParents, true);
// List<IpResource> ipResources = ipResourceRepository.findBySpecialLine(tru
e);
List
<
IpResource
>
ipResources
=
ipResourceRepository
.
findBySpecialLineAndIsDeleted
(
true
,
fals
e
);
File
file
=
new
File
(
"3proxy "
+
Instant
.
now
().
toEpochMilli
());
File
file
=
new
File
(
"3proxy "
+
Instant
.
now
().
toEpochMilli
());
SpecialLine
specialLine
=
specialLineRepository
.
findAll
().
get
(
0
);
SpecialLine
specialLine
=
specialLineRepository
.
findAll
().
get
(
0
);
try
{
try
{
...
...
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