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
2fb169b3
Commit
2fb169b3
authored
Jun 05, 2020
by
jim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shop
parent
0c2ed716
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
IpResourceDto.java
...a/com/edgec/browserbackend/browser/dto/IpResourceDto.java
+15
-9
No files found.
src/main/java/com/edgec/browserbackend/browser/dto/IpResourceDto.java
View file @
2fb169b3
...
...
@@ -2,6 +2,7 @@ package com.edgec.browserbackend.browser.dto;
import
com.edgec.browserbackend.browser.domain.*
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -34,10 +35,10 @@ public class IpResourceDto {
private
String
specialLineIp
;
public
IpResourceDto
(){
public
IpResourceDto
()
{
}
public
IpResourceDto
(
IpResource
ipResource
,
List
<
ShopDto
>
shopDtos
,
boolean
useHistory
){
public
IpResourceDto
(
IpResource
ipResource
,
List
<
ShopDto
>
shopDtos
,
boolean
useHistory
)
{
this
.
id
=
ipResource
.
getId
();
this
.
addr
=
ipResource
.
getAddr
();
this
.
vendor
=
ipResource
.
getVendor
();
...
...
@@ -51,18 +52,21 @@ public class IpResourceDto {
this
.
password
=
ipResource
.
getPassword
();
this
.
protocol
=
ipResource
.
getProtocol
();
this
.
specialLine
=
ipResource
.
isSpecialLine
();
if
(
shopDtos
!=
null
)
if
(
CollectionUtils
.
isNotEmpty
(
shopDtos
))
{
this
.
bindShops
=
shopDtos
;
else
this
.
bindShop
=
shopDtos
.
get
(
0
);
}
else
{
this
.
bindShops
=
new
ArrayList
<>();
this
.
bindShop
=
new
ShopDto
();
}
if
(
useHistory
)
this
.
bindHistories
=
ipResource
.
getBindHistory
();
else
this
.
bindHistories
=
new
ArrayList
<>();
this
.
bindShop
=
new
ShopDto
();
}
public
IpResourceDto
(
IpResource
ipResource
,
List
<
ShopDto
>
shopDtos
,
boolean
useHistory
,
SpecialLine
specialLine1
){
public
IpResourceDto
(
IpResource
ipResource
,
List
<
ShopDto
>
shopDtos
,
boolean
useHistory
,
SpecialLine
specialLine1
)
{
this
.
id
=
ipResource
.
getId
();
this
.
addr
=
ipResource
.
getAddr
();
this
.
vendor
=
ipResource
.
getVendor
();
...
...
@@ -80,16 +84,18 @@ public class IpResourceDto {
this
.
proxyPort
=
specialLine1
.
getProxyPort
();
this
.
proxyProtocol
=
specialLine1
.
getProxyProtocol
();
this
.
specialLine
=
ipResource
.
isSpecialLine
();
if
(
shopDtos
!=
null
)
if
(
CollectionUtils
.
isNotEmpty
(
shopDtos
))
{
this
.
bindShops
=
shopDtos
;
else
this
.
bindShop
=
shopDtos
.
get
(
0
);
}
else
{
this
.
bindShops
=
new
ArrayList
<>();
this
.
bindShop
=
new
ShopDto
();
}
this
.
specialLineIp
=
specialLine1
.
getIp
();
if
(
useHistory
)
this
.
bindHistories
=
ipResource
.
getBindHistory
();
else
this
.
bindHistories
=
new
ArrayList
<>();
this
.
bindShop
=
new
ShopDto
();
}
public
String
getId
()
{
...
...
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