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
18f61d97
Commit
18f61d97
authored
Jul 15, 2020
by
xuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未绑定ip的店铺
parent
d3e5d284
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
ShopServiceImpl.java
.../browserbackend/browser/service/Impl/ShopServiceImpl.java
+14
-7
No files found.
src/main/java/com/edgec/browserbackend/browser/service/Impl/ShopServiceImpl.java
View file @
18f61d97
...
...
@@ -407,15 +407,14 @@ public class ShopServiceImpl implements ShopService {
List
<
String
>
shopIds
=
null
;
if
(
shopFilterDto
.
getBindIp
()
==
0
)
{
shopIds
=
allIds
;
// 这个地方有点奇怪,为啥不去 userShop 中找,而是在 ipresource 中找? 可以查看下删除绑定状态的逻辑
}
else
if
(
shopFilterDto
.
getBindIp
()
==
1
)
{
// ip资源已经分配了 的店铺
}
// 绑定了 ip 资源的店铺
if
(
shopFilterDto
.
getBindIp
()
==
1
)
{
shopIds
=
ipResourceRepository
.
findShopIdInList
(
allIds
,
false
).
stream
()
.
flatMap
((
x
->
x
.
getShopIds
().
stream
())).
collect
(
Collectors
.
toList
());
// 这个地方的其他情况是指什么情况
}
else
{
}
// 未绑定 ip 资源的店铺
if
(
shopFilterDto
.
getBindIp
()
==
2
)
{
// 店铺绑定的 ip 资源被删除的 店铺
for
(
String
id
:
allIds
)
{
IpResource
ipResource
=
ipResourceRepository
.
findFirstByShopIdsIsAndIsDeleted
(
id
,
true
);
...
...
@@ -425,6 +424,14 @@ public class ShopServiceImpl implements ShopService {
}
}
// 临时试用一下
if
(
shopFilterDto
.
getBindIp
()
==
3
)
{
List
<
String
>
shopIds2
=
ipResourceRepository
.
findShopIdInList
(
allIds
,
false
).
stream
()
.
flatMap
((
x
->
x
.
getShopIds
().
stream
())).
collect
(
Collectors
.
toList
());
allIds
.
removeAll
(
shopIds2
);
shopIds
=
allIds
;
}
amount
=
amount
>
100
?
100
:
amount
;
Pageable
pageable
=
PageRequest
.
of
(
pageNum
,
amount
);
// 5. 根据过滤后的商铺ids 与 其他过滤条件 得到商铺信息并分页
...
...
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