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
c5a7775f
Commit
c5a7775f
authored
May 06, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专线表添加字段
parent
ffa3ceb3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
33 deletions
+33
-33
IpResource.java
...a/com/edgec/browserbackend/browser/domain/IpResource.java
+3
-20
SpecialLine.java
.../com/edgec/browserbackend/browser/domain/SpecialLine.java
+21
-0
IpResourceDto.java
...a/com/edgec/browserbackend/browser/dto/IpResourceDto.java
+4
-8
IpResourceServiceImpl.java
...erbackend/browser/service/Impl/IpResourceServiceImpl.java
+5
-5
No files found.
src/main/java/com/edgec/browserbackend/browser/domain/IpResource.java
View file @
c5a7775f
...
@@ -36,12 +36,10 @@ public class IpResource implements Serializable {
...
@@ -36,12 +36,10 @@ public class IpResource implements Serializable {
private
String
password
;
private
String
password
;
private
double
price
;
private
double
price
;
private
boolean
specialLine
;
private
boolean
specialLine
;
//是否使用专线
//专线数据
//专线数据
private
String
proxyUsername
;
private
String
proxyUsername
;
//专线的代理用户名
private
String
proxyPassword
;
private
String
proxyPassword
;
//专线的代理密码
private
List
<
String
>
proxyProtocol
;
private
List
<
String
>
proxyPort
;
private
String
shopId
;
private
String
shopId
;
private
String
shopName
;
private
String
shopName
;
...
@@ -287,19 +285,4 @@ public class IpResource implements Serializable {
...
@@ -287,19 +285,4 @@ public class IpResource implements Serializable {
this
.
specialLine
=
specialLine
;
this
.
specialLine
=
specialLine
;
}
}
public
List
<
String
>
getProxyPort
()
{
return
proxyPort
;
}
public
void
setProxyPort
(
List
<
String
>
proxyPort
)
{
this
.
proxyPort
=
proxyPort
;
}
public
List
<
String
>
getProxyProtocol
()
{
return
proxyProtocol
;
}
public
void
setProxyProtocol
(
List
<
String
>
proxyProtocol
)
{
this
.
proxyProtocol
=
proxyProtocol
;
}
}
}
src/main/java/com/edgec/browserbackend/browser/domain/SpecialLine.java
View file @
c5a7775f
...
@@ -3,6 +3,8 @@ package com.edgec.browserbackend.browser.domain;
...
@@ -3,6 +3,8 @@ package com.edgec.browserbackend.browser.domain;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
java.util.List
;
@Document
(
"specialline"
)
@Document
(
"specialline"
)
public
class
SpecialLine
{
public
class
SpecialLine
{
@Id
@Id
...
@@ -10,6 +12,9 @@ public class SpecialLine {
...
@@ -10,6 +12,9 @@ public class SpecialLine {
private
String
ip
;
private
String
ip
;
private
List
<
String
>
proxyProtocol
;
//专线使用的协议
private
List
<
String
>
proxyPort
;
//专线使用的端口
public
String
getIp
()
{
public
String
getIp
()
{
return
ip
;
return
ip
;
}
}
...
@@ -25,4 +30,20 @@ public class SpecialLine {
...
@@ -25,4 +30,20 @@ public class SpecialLine {
public
void
setId
(
String
id
)
{
public
void
setId
(
String
id
)
{
Id
=
id
;
Id
=
id
;
}
}
public
List
<
String
>
getProxyProtocol
()
{
return
proxyProtocol
;
}
public
void
setProxyProtocol
(
List
<
String
>
proxyProtocol
)
{
this
.
proxyProtocol
=
proxyProtocol
;
}
public
List
<
String
>
getProxyPort
()
{
return
proxyPort
;
}
public
void
setProxyPort
(
List
<
String
>
proxyPort
)
{
this
.
proxyPort
=
proxyPort
;
}
}
}
src/main/java/com/edgec/browserbackend/browser/dto/IpResourceDto.java
View file @
c5a7775f
...
@@ -49,10 +49,6 @@ public class IpResourceDto {
...
@@ -49,10 +49,6 @@ public class IpResourceDto {
this
.
details
=
ipResource
.
getDetails
();
this
.
details
=
ipResource
.
getDetails
();
this
.
password
=
ipResource
.
getPassword
();
this
.
password
=
ipResource
.
getPassword
();
this
.
protocol
=
ipResource
.
getProtocol
();
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
.
specialLine
=
ipResource
.
isSpecialLine
();
this
.
bindShop
=
shopDto
;
this
.
bindShop
=
shopDto
;
if
(
useHistory
)
if
(
useHistory
)
...
@@ -61,7 +57,7 @@ public class IpResourceDto {
...
@@ -61,7 +57,7 @@ public class IpResourceDto {
this
.
bindHistories
=
new
ArrayList
<>();
this
.
bindHistories
=
new
ArrayList
<>();
}
}
public
IpResourceDto
(
IpResource
ipResource
,
ShopDto
shopDto
,
boolean
useHistory
,
S
tring
speicalLineIp
){
public
IpResourceDto
(
IpResource
ipResource
,
ShopDto
shopDto
,
boolean
useHistory
,
S
pecialLine
speicalLine
){
this
.
id
=
ipResource
.
getId
();
this
.
id
=
ipResource
.
getId
();
this
.
addr
=
ipResource
.
getAddr
();
this
.
addr
=
ipResource
.
getAddr
();
this
.
vendor
=
ipResource
.
getVendor
();
this
.
vendor
=
ipResource
.
getVendor
();
...
@@ -76,11 +72,11 @@ public class IpResourceDto {
...
@@ -76,11 +72,11 @@ public class IpResourceDto {
this
.
protocol
=
ipResource
.
getProtocol
();
this
.
protocol
=
ipResource
.
getProtocol
();
this
.
proxyUsername
=
ipResource
.
getProxyUsername
();
this
.
proxyUsername
=
ipResource
.
getProxyUsername
();
this
.
proxyPassword
=
ipResource
.
getProxyPassword
();
this
.
proxyPassword
=
ipResource
.
getProxyPassword
();
this
.
proxyPort
=
ipResourc
e
.
getProxyPort
();
this
.
proxyPort
=
speicalLin
e
.
getProxyPort
();
this
.
proxyProtocol
=
ipResourc
e
.
getProxyProtocol
();
this
.
proxyProtocol
=
speicalLin
e
.
getProxyProtocol
();
this
.
specialLine
=
ipResource
.
isSpecialLine
();
this
.
specialLine
=
ipResource
.
isSpecialLine
();
this
.
bindShop
=
shopDto
;
this
.
bindShop
=
shopDto
;
this
.
speicalLineIp
=
speicalLine
Ip
;
this
.
speicalLineIp
=
speicalLine
.
getIp
()
;
if
(
useHistory
)
if
(
useHistory
)
this
.
bindHistories
=
ipResource
.
getBindHistory
();
this
.
bindHistories
=
ipResource
.
getBindHistory
();
else
else
...
...
src/main/java/com/edgec/browserbackend/browser/service/Impl/IpResourceServiceImpl.java
View file @
c5a7775f
...
@@ -153,10 +153,10 @@ public class IpResourceServiceImpl implements IpResourceService {
...
@@ -153,10 +153,10 @@ public class IpResourceServiceImpl implements IpResourceService {
return
retStr
;
return
retStr
;
}
}
//
public static void main(String[] args) {
public
static
void
main
(
String
[]
args
)
{
//
String password = genRandom(3, 12);
String
password
=
genRandom
(
3
,
12
);
//
System.out.println(password);
System
.
out
.
println
(
password
);
//
}
}
private
IpChargeRequestDto
buildIpChargeRequestDto
(
IpResourceRequestDto
request
,
int
chargeType
,
int
payMethod
)
{
private
IpChargeRequestDto
buildIpChargeRequestDto
(
IpResourceRequestDto
request
,
int
chargeType
,
int
payMethod
)
{
IpChargeRequestDto
ipChargeRequestDto
=
new
IpChargeRequestDto
();
IpChargeRequestDto
ipChargeRequestDto
=
new
IpChargeRequestDto
();
...
@@ -582,7 +582,7 @@ public class IpResourceServiceImpl implements IpResourceService {
...
@@ -582,7 +582,7 @@ public class IpResourceServiceImpl implements IpResourceService {
}
}
SpecialLine
specialLine
=
specialLineRepository
.
findAll
().
get
(
0
);
SpecialLine
specialLine
=
specialLineRepository
.
findAll
().
get
(
0
);
if
(
x
.
isSpecialLine
())
if
(
x
.
isSpecialLine
())
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
,
false
,
specialLine
.
getIp
()
));
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
,
false
,
specialLine
));
else
else
ipResourceDtos
.
add
(
new
IpResourceDto
(
x
,
shopDto
,
false
));
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