Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
haoban3.0
haoban-manage3.0
Commits
2b26ba0c
Commit
2b26ba0c
authored
Nov 22, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店查询
parent
42127995
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
10 deletions
+42
-10
WxStaffController.java
...m/gic/haoban/manage/web/controller/WxStaffController.java
+42
-10
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxStaffController.java
View file @
2b26ba0c
...
@@ -1617,7 +1617,7 @@ public class WxStaffController extends WebBaseController {
...
@@ -1617,7 +1617,7 @@ public class WxStaffController extends WebBaseController {
// 区经门店列表
// 区经门店列表
@RequestMapping
(
"/list-clerk-store"
)
@RequestMapping
(
"/list-clerk-store"
)
public
RestResponse
<
Object
>
listClerkStore
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
)
{
public
RestResponse
<
Object
>
listClerkStore
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
,
String
storeSearchParams
)
{
List
<
String
>
storeIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
)
;
List
<
String
>
storeIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
)
;
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
...
@@ -1674,17 +1674,34 @@ public class WxStaffController extends WebBaseController {
...
@@ -1674,17 +1674,34 @@ public class WxStaffController extends WebBaseController {
return
RestResponse
.
successResult
(
page
);
return
RestResponse
.
successResult
(
page
);
}
}
//区经门店查询
@RequestMapping
(
"search-clerk-store"
)
@RequestMapping
(
"/list-clerk-store-page"
)
public
RestResponse
<
Object
>
listClerkStoreByParams
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
,
String
storeSearchParams
)
{
public
RestResponse
<
Object
>
listClerkStorePage
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
,
String
storeSearchParams
)
{
if
(
StringUtils
.
isEmpty
(
storeSearchParams
))
{
return
RestResponse
.
failure
(
"-1"
,
"查询条件为空"
)
;
}
// 如果有权限控制,进行管辖门店过0滤
// 如果有权限控制,进行管辖门店过0滤
List
<
String
>
authStoreIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
List
<
String
>
authStoreIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
authStoreIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
authStoreIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
}
}
Page
page
=
this
.
page
(
wxEnterpriseId
,
enterpriseId
,
clerkId
,
20
,
1
,
storeSearchParams
,
authStoreIdList
)
;
List
<
StoreDTO
>
storeList
=
(
List
<
StoreDTO
>)
page
.
getResult
();
List
<
StoreListVO
>
retList
=
new
ArrayList
<
StoreListVO
>();
StoreListVO
vo
=
null
;
for
(
StoreDTO
dto
:
storeList
)
{
vo
=
new
StoreListVO
();
vo
.
setStoreId
(
dto
.
getStoreId
());
vo
.
setStoreName
(
dto
.
getStoreName
());
retList
.
add
(
vo
);
}
Page
<
StoreListVO
>
retPage
=
new
Page
<>();
retPage
.
setResult
(
retList
);
retPage
.
setTotalCount
(
page
.
getTotalCount
());
retPage
.
setCurrentPage
(
currentPage
);
retPage
.
setPageSize
(
pageSize
);
return
RestResponse
.
successResult
(
retPage
);
}
private
Page
page
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
,
String
storeSearchParams
,
List
<
String
>
authStoreIdList
)
{
StoreSearchDTO
searchDTO
=
new
StoreSearchDTO
();
StoreSearchDTO
searchDTO
=
new
StoreSearchDTO
();
searchDTO
.
setRecycleStoreCount
(
0
);
searchDTO
.
setRecycleStoreCount
(
0
);
searchDTO
.
setMemberCountFlag
(
0
);
searchDTO
.
setMemberCountFlag
(
0
);
...
@@ -1696,15 +1713,30 @@ public class WxStaffController extends WebBaseController {
...
@@ -1696,15 +1713,30 @@ public class WxStaffController extends WebBaseController {
}
}
// 门店参数
// 门店参数
Page
page
=
new
Page
();
Page
page
=
new
Page
();
page
.
setPageSize
(
20
);
page
.
setPageSize
(
pageSize
);
page
.
setCurrentPage
(
1
);
page
.
setCurrentPage
(
currentPage
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"searchDto"
,
searchDTO
);
params
.
put
(
"searchDto"
,
searchDTO
);
page
.
setParams
(
params
);
page
.
setParams
(
params
);
logger
.
info
(
"查询条件={}"
,
JSON
.
toJSONString
(
page
));
logger
.
info
(
"查询条件={}"
,
JSON
.
toJSONString
(
page
));
Map
<
String
,
Object
>
result
=
storeService
.
getStoreListPage
(
page
);
Map
<
String
,
Object
>
result
=
storeService
.
getStoreListPage
(
page
);
page
=
(
Page
)
result
.
get
(
"page"
);
page
=
(
Page
)
result
.
get
(
"page"
);
List
<
StoreDTO
>
storeList
=
(
List
<
StoreDTO
>)
result
.
get
(
"list"
);
return
page
;
}
//区经门店查询
@RequestMapping
(
"search-clerk-store"
)
public
RestResponse
<
Object
>
listClerkStoreByParams
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
,
String
storeSearchParams
)
{
if
(
StringUtils
.
isEmpty
(
storeSearchParams
))
{
return
RestResponse
.
failure
(
"-1"
,
"查询条件为空"
)
;
}
// 如果有权限控制,进行管辖门店过0滤
List
<
String
>
authStoreIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
authStoreIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
}
Page
page
=
this
.
page
(
wxEnterpriseId
,
enterpriseId
,
clerkId
,
20
,
1
,
storeSearchParams
,
authStoreIdList
)
;
List
<
StoreDTO
>
storeList
=
(
List
<
StoreDTO
>)
page
.
getResult
();
List
<
StoreListVO
>
retList
=
new
ArrayList
<
StoreListVO
>();
List
<
StoreListVO
>
retList
=
new
ArrayList
<
StoreListVO
>();
StoreListVO
vo
=
null
;
StoreListVO
vo
=
null
;
for
(
StoreDTO
dto
:
storeList
)
{
for
(
StoreDTO
dto
:
storeList
)
{
...
...
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