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
c34f036d
Commit
c34f036d
authored
Mar 23, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定记录
parent
8fc704b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
Shop.java
...in/java/com/edgec/browserbackend/browser/domain/Shop.java
+4
-2
ShopServiceImpl.java
.../browserbackend/browser/service/Impl/ShopServiceImpl.java
+6
-7
No files found.
src/main/java/com/edgec/browserbackend/browser/domain/Shop.java
View file @
c34f036d
...
@@ -63,7 +63,8 @@ public class Shop {
...
@@ -63,7 +63,8 @@ public class Shop {
this
.
setShopUA
(
shop
.
getShopUA
());
this
.
setShopUA
(
shop
.
getShopUA
());
if
(
shop
.
getShopCookie
()
!=
null
)
if
(
shop
.
getShopCookie
()
!=
null
)
this
.
setShopCookie
(
shop
.
getShopCookie
());
this
.
setShopCookie
(
shop
.
getShopCookie
());
this
.
setCreateTime
(
shop
.
getCreateTime
());
if
(
shop
.
getCreateTime
()
!=
0
)
this
.
setCreateTime
(
shop
.
getCreateTime
());
return
this
;
return
this
;
}
}
...
@@ -92,7 +93,8 @@ public class Shop {
...
@@ -92,7 +93,8 @@ public class Shop {
this
.
setShopUA
(
shop
.
getShopUA
());
this
.
setShopUA
(
shop
.
getShopUA
());
if
(
shop
.
getShopCookie
()
!=
null
)
if
(
shop
.
getShopCookie
()
!=
null
)
this
.
setShopCookie
(
shop
.
getShopCookie
());
this
.
setShopCookie
(
shop
.
getShopCookie
());
this
.
setCreateTime
(
shop
.
getCreateTime
());
if
(
shop
.
getCreateTime
()
!=
0
)
this
.
setCreateTime
(
shop
.
getCreateTime
());
return
this
;
return
this
;
}
}
...
...
src/main/java/com/edgec/browserbackend/browser/service/Impl/ShopServiceImpl.java
View file @
c34f036d
...
@@ -30,7 +30,6 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -30,7 +30,6 @@ import org.springframework.web.multipart.MultipartFile;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.time.Instant
;
import
java.time.Instant
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -286,12 +285,12 @@ public class ShopServiceImpl implements ShopService {
...
@@ -286,12 +285,12 @@ public class ShopServiceImpl implements ShopService {
if
(!
ipResource
.
getId
().
equals
(
shop
.
getIpId
()))
if
(!
ipResource
.
getId
().
equals
(
shop
.
getIpId
()))
throw
new
ClientRequestException
(
BrowserErrorCode
.
IPNOTBINDTOSHOP
);
throw
new
ClientRequestException
(
BrowserErrorCode
.
IPNOTBINDTOSHOP
);
try
{
try
{
List
<
HashMap
<
String
,
String
>
>
history
=
ipResource
.
getBindHistory
();
List
<
BindHistory
>
history
=
ipResource
.
getBindHistory
();
HashMap
<
String
,
String
>
map
=
new
HashMap
<>
();
BindHistory
bindHistory
=
new
BindHistory
();
map
.
put
(
"shopName"
,
shop
.
getShopName
());
bindHistory
.
setIp
(
ipResource
.
getAddr
());
map
.
put
(
"platform"
,
shop
.
getShopPlatform
());
bindHistory
.
setPlatform
(
shop
.
getShopPlatform
());
map
.
put
(
"ip"
,
ipResource
.
getAddr
());
bindHistory
.
setShopName
(
shop
.
getShopName
());
history
.
add
(
map
);
history
.
add
(
bindHistory
);
shop
.
setIp
(
null
);
shop
.
setIp
(
null
);
shop
.
setIpId
(
null
);
shop
.
setIpId
(
null
);
shop
.
setIpRegion
(
null
);
shop
.
setIpRegion
(
null
);
...
...
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