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
853fdf4e
Commit
853fdf4e
authored
Oct 29, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店查询
parent
746c5f8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
1 deletions
+43
-1
WxStaffController.java
...m/gic/haoban/manage/web/controller/WxStaffController.java
+43
-1
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxStaffController.java
View file @
853fdf4e
...
@@ -24,7 +24,6 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -24,7 +24,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
...
@@ -41,6 +40,7 @@ import com.gic.commons.util.EntityUtil;
...
@@ -41,6 +40,7 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreSearchDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
...
@@ -1664,6 +1664,48 @@ public class WxStaffController extends WebBaseController {
...
@@ -1664,6 +1664,48 @@ public class WxStaffController extends WebBaseController {
return
RestResponse
.
successResult
(
page
);
return
RestResponse
.
successResult
(
page
);
}
}
//区经门店查询
@RequestMapping
(
"search-clerk-store"
)
public
RestResponse
<
Object
>
listClerkStoreByParams
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeSearchParams
,
String
clerkId
)
{
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"
,
"无授权门店"
);
}
StoreSearchDTO
searchDTO
=
new
StoreSearchDTO
();
searchDTO
.
setRecycleStoreCount
(
0
);
searchDTO
.
setMemberCountFlag
(
0
);
searchDTO
.
setSearchName
(
storeSearchParams
);
// 企业ID
searchDTO
.
setEnterpriseId
(
enterpriseId
);
if
(!
authStoreIdList
.
contains
(
"-1"
))
{
searchDTO
.
setAuthStoreIdList
(
authStoreIdList
);
}
// 门店参数
Page
page
=
new
Page
();
page
.
setPageSize
(
20
);
page
.
setCurrentPage
(
1
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"searchDto"
,
searchDTO
);
page
.
setParams
(
params
);
logger
.
info
(
"查询条件={}"
,
JSON
.
toJSONString
(
page
));
Map
<
String
,
Object
>
result
=
storeService
.
getStoreListPage
(
page
);
page
=
(
Page
)
result
.
get
(
"page"
);
List
<
StoreDTO
>
storeList
=
(
List
<
StoreDTO
>)
result
.
get
(
"list"
);
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
);
}
return
RestResponse
.
successResult
(
retList
);
}
private
List
<
String
>
getStoreIdList
(
ClerkDTO
clerkDTO
)
{
private
List
<
String
>
getStoreIdList
(
ClerkDTO
clerkDTO
)
{
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
()
;
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
()
;
String
clerkId
=
clerkDTO
.
getClerkId
();
String
clerkId
=
clerkDTO
.
getClerkId
();
...
...
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