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
9de14422
Commit
9de14422
authored
Jun 06, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:删除旧权限代码
parent
df5a3905
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
57 deletions
+0
-57
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+0
-13
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+0
-44
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
9de14422
...
...
@@ -247,19 +247,6 @@ public interface StaffApiService {
*/
StaffQrCodeDTO
getQrCodeByClerkId
(
String
clerkId
);
/**
* 导购gic门店和好办企业门店交集
* 所有门店返回所有门店列表
*
* @param clerkId 职员id
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link String }>
* @author mozhu
* @date 2022-05-25 15:37:24
*/
List
<
String
>
getHaoBanStoreRolesByClerkId
(
String
clerkId
,
String
wxEnterpriseId
);
/**
* 导购gic门店和好办企业门店交集
* 所有门店返回 -1
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
9de14422
...
...
@@ -1296,50 +1296,6 @@ public class StaffApiServiceImpl implements StaffApiService {
}
@Override
public
List
<
String
>
getHaoBanStoreRolesByClerkId
(
String
clerkId
,
String
wxEnterpriseId
)
{
logger
.
info
(
"查询导购权限,clerkId={},wxEnterpriseId={}"
,
clerkId
,
wxEnterpriseId
);
if
(
StringUtils
.
isAnyBlank
(
clerkId
,
wxEnterpriseId
))
{
logger
.
info
(
"参数为空clerkId={},wxEnterpriseId={}"
,
clerkId
,
wxEnterpriseId
);
return
Collections
.
emptyList
();
}
String
cacheKey
=
"hb:clerk:store:"
+
clerkId
+
wxEnterpriseId
;
Object
cache
=
RedisUtil
.
getCache
(
cacheKey
);
if
(
cache
!=
null
)
{
logger
.
info
(
"从缓存中获取通道={}"
,
cacheKey
);
return
(
List
<
String
>)
cache
;
}
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
==
null
)
{
logger
.
info
(
"导购不存在:clerkId:{}"
,
clerkId
);
return
Collections
.
emptyList
();
}
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
();
List
<
String
>
enterpriseIdStoreIds
=
storeRangeService
.
listStoreIdByWxEnterpriseId
(
wxEnterpriseId
,
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
enterpriseIdStoreIds
))
{
logger
.
info
(
"好办门店空,eid={}"
,
enterpriseId
);
return
Collections
.
emptyList
();
}
logger
.
info
(
"好办门店id数量:{}"
,
enterpriseIdStoreIds
.
size
());
List
<
String
>
gicStoreIds
=
getStoreIdList
(
clerkDTO
);
if
(
CollectionUtils
.
isEmpty
(
gicStoreIds
))
{
logger
.
info
(
"gic门店为空"
);
return
Collections
.
emptyList
();
}
if
(
gicStoreIds
.
contains
(
"-1"
))
{
logger
.
info
(
"gic超管,clerkId:{}"
,
clerkId
);
RedisUtil
.
setCache
(
cacheKey
,
enterpriseIdStoreIds
,
10L
,
TimeUnit
.
MINUTES
);
return
enterpriseIdStoreIds
;
}
logger
.
info
(
"gic门店数量:{}"
,
gicStoreIds
.
size
());
//取交集
List
<
String
>
storeList
=
RolesListUtils
.
mergeList
(
enterpriseIdStoreIds
,
gicStoreIds
);
logger
.
info
(
"该导购权限:clerkId:{},门店数量:{}"
,
clerkId
,
storeList
.
size
());
RedisUtil
.
setCache
(
cacheKey
,
storeList
,
10L
,
TimeUnit
.
MINUTES
);
return
storeList
;
}
@Override
public
List
<
String
>
getHaoBanStoreIdsRolesByClerkId
(
String
clerkId
,
String
wxEnterpriseId
)
{
logger
.
info
(
"查询导购权限,clerkId={},wxEnterpriseId={}"
,
clerkId
,
wxEnterpriseId
);
if
(
StringUtils
.
isAnyBlank
(
clerkId
,
wxEnterpriseId
))
{
...
...
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