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
a96f40a2
Commit
a96f40a2
authored
May 06, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专线
parent
b438395c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
1 deletion
+71
-1
SpecialLine.java
.../com/edgec/browserbackend/browser/domain/SpecialLine.java
+28
-0
IpResourceDto.java
...a/com/edgec/browserbackend/browser/dto/IpResourceDto.java
+28
-0
SpecialLineRepository.java
...wserbackend/browser/repository/SpecialLineRepository.java
+7
-0
IpResourceServiceImpl.java
...erbackend/browser/service/Impl/IpResourceServiceImpl.java
+8
-1
No files found.
src/main/java/com/edgec/browserbackend/browser/domain/SpecialLine.java
0 → 100644
View file @
a96f40a2
package
com
.
edgec
.
browserbackend
.
browser
.
domain
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.mongodb.core.mapping.Document
;
@Document
(
"specailline"
)
public
class
SpecialLine
{
@Id
private
String
Id
;
private
String
ip
;
public
String
getIp
()
{
return
ip
;
}
public
void
setIp
(
String
ip
)
{
this
.
ip
=
ip
;
}
public
String
getId
()
{
return
Id
;
}
public
void
setId
(
String
id
)
{
Id
=
id
;
}
}
src/main/java/com/edgec/browserbackend/browser/dto/IpResourceDto.java
View file @
a96f40a2
...
...
@@ -31,6 +31,8 @@ public class IpResourceDto {
private
String
proxyProtocol
;
private
List
<
String
>
proxyPort
;
private
String
speicalLineIp
;
public
IpResourceDto
(){
}
...
...
@@ -59,6 +61,32 @@ public class IpResourceDto {
this
.
bindHistories
=
new
ArrayList
<>();
}
public
IpResourceDto
(
IpResource
ipResource
,
ShopDto
shopDto
,
boolean
useHistory
,
String
speicalLineIp
){
this
.
id
=
ipResource
.
getId
();
this
.
addr
=
ipResource
.
getAddr
();
this
.
vendor
=
ipResource
.
getVendor
();
this
.
region
=
ipResource
.
getRegion
();
this
.
status
=
ipResource
.
getStatus
();
this
.
port
=
ipResource
.
getPort
();
this
.
purchasedTime
=
ipResource
.
getPurchasedTime
();
this
.
validTime
=
ipResource
.
getValidTime
();
this
.
username
=
ipResource
.
getUsername
();
this
.
details
=
ipResource
.
getDetails
();
this
.
password
=
ipResource
.
getPassword
();
this
.
protocol
=
ipResource
.
getProtocol
();
this
.
proxyUsername
=
ipResource
.
getProxyUsername
();
this
.
proxyPassword
=
ipResource
.
getProxyPassword
();
this
.
proxyPort
=
ipResource
.
getProxyPort
();
this
.
proxyProtocol
=
ipResource
.
getProxyProtocol
();
this
.
specialLine
=
ipResource
.
isSpecialLine
();
this
.
bindShop
=
shopDto
;
this
.
speicalLineIp
=
speicalLineIp
;
if
(
useHistory
)
this
.
bindHistories
=
ipResource
.
getBindHistory
();
else
this
.
bindHistories
=
new
ArrayList
<>();
}
public
String
getId
()
{
return
id
;
}
...
...
src/main/java/com/edgec/browserbackend/browser/repository/SpecialLineRepository.java
0 → 100644
View file @
a96f40a2
package
com
.
edgec
.
browserbackend
.
browser
.
repository
;
import
com.edgec.browserbackend.browser.domain.SpecialLine
;
import
org.springframework.data.mongodb.repository.MongoRepository
;
public
interface
SpecialLineRepository
extends
MongoRepository
<
SpecialLine
,
String
>
{
}
src/main/java/com/edgec/browserbackend/browser/service/Impl/IpResourceServiceImpl.java
View file @
a96f40a2
...
...
@@ -83,6 +83,9 @@ public class IpResourceServiceImpl implements IpResourceService {
@Autowired
private
IpAndShopService
ipAndShopService
;
@Autowired
private
SpecialLineRepository
specialLineRepository
;
public
HttpHeaders
buildPostHeader
()
{
HttpHeaders
header
=
new
HttpHeaders
();
header
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
...
...
@@ -577,7 +580,11 @@ public class IpResourceServiceImpl implements IpResourceService {
if
(
x
.
getStatus
()
==
3
)
{
x
.
setAddr
(
""
);
}
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
,
false
));
SpecialLine
specialLine
=
specialLineRepository
.
findAll
().
get
(
0
);
if
(
x
.
isSpecialLine
())
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
,
false
,
specialLine
.
getIp
()));
else
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
,
false
));
});
}
...
...
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