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
1ee52a4d
Commit
1ee52a4d
authored
Jun 29, 2020
by
jim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log
parent
b89daafd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
ShopServiceImpl.java
.../browserbackend/browser/service/Impl/ShopServiceImpl.java
+3
-4
No files found.
src/main/java/com/edgec/browserbackend/browser/service/Impl/ShopServiceImpl.java
View file @
1ee52a4d
...
@@ -379,7 +379,7 @@ public class ShopServiceImpl implements ShopService {
...
@@ -379,7 +379,7 @@ public class ShopServiceImpl implements ShopService {
.
map
(
UserShop:
:
getShopId
).
collect
(
Collectors
.
toList
());
.
map
(
UserShop:
:
getShopId
).
collect
(
Collectors
.
toList
());
}
}
List
<
String
>
shopIds
=
n
ull
;
List
<
String
>
shopIds
=
n
ew
ArrayList
<>()
;
if
(
shopFilterDto
.
getBindIp
()
==
0
)
{
if
(
shopFilterDto
.
getBindIp
()
==
0
)
{
shopIds
=
allIds
;
shopIds
=
allIds
;
...
@@ -400,7 +400,7 @@ public class ShopServiceImpl implements ShopService {
...
@@ -400,7 +400,7 @@ public class ShopServiceImpl implements ShopService {
}
}
}
}
amount
=
amount
>
100
?
100
:
amount
;
amount
=
Math
.
min
(
amount
,
100
)
;
Pageable
pageable
=
PageRequest
.
of
(
pageNum
,
amount
);
Pageable
pageable
=
PageRequest
.
of
(
pageNum
,
amount
);
// 根据商铺ids 与 过滤条件 得到商铺
// 根据商铺ids 与 过滤条件 得到商铺
Page
<
Shop
>
shops
=
getShopsByFilter
(
shopFilterDto
,
shopIds
,
pageable
);
Page
<
Shop
>
shops
=
getShopsByFilter
(
shopFilterDto
,
shopIds
,
pageable
);
...
@@ -408,7 +408,7 @@ public class ShopServiceImpl implements ShopService {
...
@@ -408,7 +408,7 @@ public class ShopServiceImpl implements ShopService {
ShopPageResultDto
<
ShopResultDto
>
shopPageResultDto
=
new
ShopPageResultDto
<>();
ShopPageResultDto
<
ShopResultDto
>
shopPageResultDto
=
new
ShopPageResultDto
<>();
if
(
shops
!=
null
&&
shops
.
getNumberOfElements
()
>=
1
)
{
if
(
shops
!=
null
&&
shops
.
getNumberOfElements
()
>=
1
)
{
List
<
ShopResultDto
>
shopResultDtos
=
new
ArrayList
<>();
List
<
ShopResultDto
>
shopResultDtos
=
new
ArrayList
<>();
shops
.
getContent
().
stream
().
forEach
(
shops
.
getContent
().
forEach
(
x
->
{
x
->
{
IpResource
ipResource
=
ipResourceRepository
.
findFirstByShopIdsIsAndIsDeleted
(
x
.
getShopId
(),
false
);
IpResource
ipResource
=
ipResourceRepository
.
findFirstByShopIdsIsAndIsDeleted
(
x
.
getShopId
(),
false
);
// 如果 ip资源非空 且 addr 也非空
// 如果 ip资源非空 且 addr 也非空
...
@@ -476,7 +476,6 @@ public class ShopServiceImpl implements ShopService {
...
@@ -476,7 +476,6 @@ public class ShopServiceImpl implements ShopService {
public
ShopSummary
getShopSummary
(
String
username
)
{
public
ShopSummary
getShopSummary
(
String
username
)
{
Account
account
=
accountRepository
.
findByName
(
username
).
orElseThrow
(()
->
new
ClientRequestException
(
AccountErrorCode
.
NAMENOTEXIST
));
Account
account
=
accountRepository
.
findByName
(
username
).
orElseThrow
(()
->
new
ClientRequestException
(
AccountErrorCode
.
NAMENOTEXIST
));
ShopSummary
shopSummary
=
new
ShopSummary
();
ShopSummary
shopSummary
=
new
ShopSummary
();
List
<
String
>
allShopIds
=
userShopRepository
.
findByUsername
(
username
).
stream
()
List
<
String
>
allShopIds
=
userShopRepository
.
findByUsername
(
username
).
stream
()
.
map
(
UserShop:
:
getShopId
).
collect
(
Collectors
.
toList
());
.
map
(
UserShop:
:
getShopId
).
collect
(
Collectors
.
toList
());
...
...
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