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
2bc0ebce
Commit
2bc0ebce
authored
Jul 07, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店查询
parent
8ef2a4f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
0 deletions
+127
-0
HmStoreController.java
...ic/haoban/manage/web/controller/hm/HmStoreController.java
+78
-0
StoreVO.java
...rc/main/java/com/gic/haoban/manage/web/vo/hm/StoreVO.java
+49
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmStoreController.java
View file @
2bc0ebce
...
...
@@ -25,6 +25,9 @@ import com.gic.clerk.api.dto.ClerkStoreListDTO;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreSearchDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
...
...
@@ -34,8 +37,10 @@ import com.gic.haoban.manage.api.service.StaffClerkRelationApiService;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.web.vo.hm.ClerkListVO
;
import
com.gic.haoban.manage.web.vo.hm.ClerkStoreListVO
;
import
com.gic.haoban.manage.web.vo.hm.StoreVO
;
@RestController
@RequestMapping
(
"hm"
)
public
class
HmStoreController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
HmStoreController
.
class
);
...
...
@@ -48,7 +53,19 @@ public class HmStoreController {
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
private
HmQrcodeApiService
hmQrcodeApiService
;
@Autowired
private
StoreService
storeService
;
/**
*
* @Title: listStoreClerk
* @Description: 活码选择导购
* @author xugh
* @param request
* @param basePageInfo
* @return
* @throws
*/
@RequestMapping
(
"store-clerk-list"
)
@ResponseBody
public
RestResponse
<
Object
>
listStoreClerk
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
...
...
@@ -165,4 +182,65 @@ public class HmStoreController {
}
});
}
/**
*
* @Title: listStore
* @Description: 链接-推荐门店查询
* @author xugh
* @param request
* @param basePageInfo
* @return
* @throws
*/
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
@RequestMapping
(
"store-list"
)
@ResponseBody
public
RestResponse
<
Object
>
listStore
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
// 如果有权限控制,进行管辖门店过0滤
List
<
String
>
authStoreIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
loginUser
.
getClerkId
(),
loginUser
.
getWxEnterpriseId
());
if
(
CollectionUtils
.
isEmpty
(
authStoreIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
}
StoreSearchDTO
searchDTO
=
new
StoreSearchDTO
();
// 上线门店
searchDTO
.
setStatus
(
"2"
);
searchDTO
.
setRecycleStoreCount
(
0
);
searchDTO
.
setMemberCountFlag
(
0
);
String
storeSearchParams
=
request
.
getParameter
(
"storeSearchParams"
);
searchDTO
.
setSearchName
(
storeSearchParams
);
// 企业ID
searchDTO
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
// 授权门店 且有活码的门店
if
(
CollectionUtils
.
isNotEmpty
(
authStoreIdList
))
{
searchDTO
.
setAuthStoreIdList
(
authStoreIdList
);
}
// 门店参数
Page
page
=
new
Page
();
page
.
setPageSize
(
basePageInfo
.
getPageSize
());
page
.
setCurrentPage
(
basePageInfo
.
getPageNum
());
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"searchDto"
,
searchDTO
);
page
.
setParams
(
params
);
logger
.
info
(
"params:{}"
,
JSON
.
toJSONString
(
page
));
Map
<
String
,
Object
>
result
=
storeService
.
getStoreListPage
(
page
);
page
=
(
Page
)
result
.
get
(
"page"
);
List
<
StoreDTO
>
storeList
=
(
List
<
StoreDTO
>)
result
.
get
(
"list"
);
List
<
StoreVO
>
retList
=
new
ArrayList
<
StoreVO
>();
StoreVO
vo
=
null
;
for
(
StoreDTO
dto
:
storeList
)
{
vo
=
new
StoreVO
();
vo
.
setStoreId
(
dto
.
getStoreId
());
vo
.
setStoreCode
(
dto
.
getStoreCode
());
vo
.
setStoreName
(
dto
.
getStoreName
());
// todo
vo
.
setIsOver
(
1
);
retList
.
add
(
vo
);
}
page
.
setResult
(
retList
);
return
RestResponse
.
successResult
(
page
);
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/hm/StoreVO.java
0 → 100644
View file @
2bc0ebce
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
hm
;
public
class
StoreVO
{
private
String
storeId
;
private
String
storeName
;
private
String
storeCode
;
private
int
isOver
;
public
int
getIsOver
()
{
return
isOver
;
}
public
void
setIsOver
(
int
isOver
)
{
this
.
isOver
=
isOver
;
}
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
public
String
getStoreName
()
{
return
storeName
;
}
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
public
String
getStoreCode
()
{
return
storeCode
;
}
public
void
setStoreCode
(
String
storeCode
)
{
this
.
storeCode
=
storeCode
;
}
public
String
getKey
()
{
return
this
.
storeId
;
}
public
String
getValue
()
{
return
this
.
storeName
;
}
}
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