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
9f325860
Commit
9f325860
authored
Mar 10, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shop接口修改
parent
9728c965
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
ShopPageInfo.java
...va/com/edgec/browserbackend/browser/dto/ShopPageInfo.java
+3
-3
ShopServiceImpl.java
.../browserbackend/browser/service/Impl/ShopServiceImpl.java
+3
-2
No files found.
src/main/java/com/edgec/browserbackend/browser/dto/ShopPageInfo.java
View file @
9f325860
...
@@ -3,7 +3,7 @@ package com.edgec.browserbackend.browser.dto;
...
@@ -3,7 +3,7 @@ package com.edgec.browserbackend.browser.dto;
public
class
ShopPageInfo
{
public
class
ShopPageInfo
{
int
currentPage
;
int
currentPage
;
int
totalPage
;
int
totalPage
;
int
totalShops
;
long
totalShops
;
public
int
getCurrentPage
()
{
public
int
getCurrentPage
()
{
return
currentPage
;
return
currentPage
;
...
@@ -21,11 +21,11 @@ public class ShopPageInfo {
...
@@ -21,11 +21,11 @@ public class ShopPageInfo {
this
.
totalPage
=
totalPage
;
this
.
totalPage
=
totalPage
;
}
}
public
int
getTotalShops
()
{
public
long
getTotalShops
()
{
return
totalShops
;
return
totalShops
;
}
}
public
void
setTotalShops
(
int
totalShops
)
{
public
void
setTotalShops
(
long
totalShops
)
{
this
.
totalShops
=
totalShops
;
this
.
totalShops
=
totalShops
;
}
}
}
}
src/main/java/com/edgec/browserbackend/browser/service/Impl/ShopServiceImpl.java
View file @
9f325860
...
@@ -312,13 +312,14 @@ public class ShopServiceImpl implements ShopService {
...
@@ -312,13 +312,14 @@ public class ShopServiceImpl implements ShopService {
String
group1
=
userShopRepository
.
findByUsernameAndShopId
(
username
,
x
.
getShopId
()).
getGroupId
();
String
group1
=
userShopRepository
.
findByUsernameAndShopId
(
username
,
x
.
getShopId
()).
getGroupId
();
shopDtos
.
add
(
ShopDto
.
of
(
x
,
group1
,
ipResource
));
shopDtos
.
add
(
ShopDto
.
of
(
x
,
group1
,
ipResource
));
});
});
logger
.
error
(
shopDtos
.
size
()
+
"!!"
);
Page
<
ShopDto
>
shopDtoPage
=
new
PageImpl
<>(
shopDtos
,
pageable
,
shopDtos
.
size
());
Page
<
ShopDto
>
shopDtoPage
=
new
PageImpl
<>(
shopDtos
,
pageable
,
shopDtos
.
size
());
ShopPageResultDto
shopPageResultDto
=
new
ShopPageResultDto
();
ShopPageResultDto
shopPageResultDto
=
new
ShopPageResultDto
();
shopPageResultDto
.
setShopList
(
shopDtoPage
.
getContent
());
shopPageResultDto
.
setShopList
(
shopDtoPage
.
getContent
());
ShopPageInfo
shopPageInfo
=
new
ShopPageInfo
();
ShopPageInfo
shopPageInfo
=
new
ShopPageInfo
();
shopPageInfo
.
setCurrentPage
(
shopDtoPage
.
getPageable
().
getPageNumber
());
shopPageInfo
.
setCurrentPage
(
shopDtoPage
.
getPageable
().
getPageNumber
()
+
1
);
shopPageInfo
.
setTotalPage
(
shopDtoPage
.
getTotalPages
());
shopPageInfo
.
setTotalPage
(
shopDtoPage
.
getTotalPages
());
shopPageInfo
.
setTotalShops
(
shopDto
s
.
size
());
shopPageInfo
.
setTotalShops
(
shopDto
Page
.
getTotalElements
());
shopPageResultDto
.
setShopPage
(
shopPageInfo
);
shopPageResultDto
.
setShopPage
(
shopPageInfo
);
return
shopPageResultDto
;
return
shopPageResultDto
;
}
}
...
...
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