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
899b104d
Commit
899b104d
authored
Nov 01, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log
parent
415e9a55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+11
-13
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
899b104d
...
...
@@ -801,24 +801,24 @@ public class StaffApiServiceImpl implements StaffApiService {
Object
cache
=
RedisUtil
.
getCache
(
cacheKey
);
if
(
cache
!=
null
)
{
List
<
String
>
storeList
=
(
List
<
String
>)
cache
;
logger
.
info
(
"从缓存中获取
通道={},
数量:{}"
,
cacheKey
,
storeList
.
size
());
logger
.
info
(
"从缓存中获取
key={},store
数量:{}"
,
cacheKey
,
storeList
.
size
());
return
storeList
;
}
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
==
null
)
{
logger
.
info
(
"导购不存在:clerkId:{}"
,
clerkId
);
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
);
logger
.
info
(
"
无好办门店
,eid={}"
,
enterpriseId
);
return
Collections
.
emptyList
();
}
logger
.
info
(
"好办门店
id数量:
{}"
,
enterpriseIdStoreIds
.
size
());
logger
.
info
(
"好办门店
数量=
{}"
,
enterpriseIdStoreIds
.
size
());
List
<
String
>
gicStoreIds
=
getStoreIdList
(
clerkDTO
);
if
(
CollectionUtils
.
isEmpty
(
gicStoreIds
))
{
logger
.
info
(
"gic门店为空"
);
logger
.
info
(
"
无
gic门店为空"
);
return
Collections
.
emptyList
();
}
if
(
gicStoreIds
.
contains
(
"-1"
))
{
...
...
@@ -838,10 +838,10 @@ public class StaffApiServiceImpl implements StaffApiService {
RedisUtil
.
setCache
(
cacheKey
,
enterpriseIdStoreIds
,
10L
,
TimeUnit
.
MINUTES
);
return
enterpriseIdStoreIds
;
}
logger
.
info
(
"gic门店数量
:
{}"
,
gicStoreIds
.
size
());
logger
.
info
(
"gic门店数量
=
{}"
,
gicStoreIds
.
size
());
//取交集
List
<
String
>
storeList
=
RolesListUtils
.
mergeList
(
enterpriseIdStoreIds
,
gicStoreIds
);
logger
.
info
(
"
该导购权限:clerkId:{},门店数量:
{}"
,
clerkId
,
storeList
.
size
());
logger
.
info
(
"
clerkId={},门店交集数量=
{}"
,
clerkId
,
storeList
.
size
());
RedisUtil
.
setCache
(
cacheKey
,
storeList
,
10L
,
TimeUnit
.
MINUTES
);
return
storeList
;
}
...
...
@@ -912,7 +912,6 @@ public class StaffApiServiceImpl implements StaffApiService {
Integer
superAdmin
=
clerkDTO
.
getSuperAdmin
();
if
(
superAdmin
!=
null
&&
superAdmin
==
1
)
{
logger
.
info
(
"gic超管,clerkId:{}"
,
clerkId
);
//gic超管
return
Collections
.
singletonList
(
"-1"
);
}
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
();
...
...
@@ -920,23 +919,22 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
enterpriseSetting
.
getEnableAccessControl
()
!=
null
&&
enterpriseSetting
.
getEnableAccessControl
()
==
1
)
{
String
storeWidgetId
=
this
.
powerService
.
getStoreWidgetId
(
new
Date
(),
clerkId
);
if
(
StringUtils
.
isBlank
(
storeWidgetId
))
{
logger
.
info
(
"导购
权限不存在
"
);
logger
.
info
(
"导购
无门店权限,门店组件id is null
"
);
return
Collections
.
emptyList
();
}
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidgetBykey
(
storeWidgetId
);
if
(
storeWidgetDTO
==
null
)
{
logger
.
info
(
"导购
权限不存在"
);
logger
.
info
(
"导购
门店权限查不到,storeWidgetId={}"
,
storeWidgetId
);
return
Collections
.
emptyList
();
}
Integer
selectType
=
storeWidgetDTO
.
getSelectType
();
if
(
selectType
!=
null
&&
selectType
==
0
)
{
//gic超管
logger
.
info
(
"gic超管,clerkId:{}"
,
clerkId
);
logger
.
info
(
"gic超管所有门店,clerkId:{}"
,
clerkId
);
return
Collections
.
singletonList
(
"-1"
);
}
return
getStoreWidgetIdStoreIds
(
storeWidgetId
,
enterpriseId
);
}
else
{
//未开启分权
logger
.
info
(
"无开启权限 ,所有门店,clerkId={}"
,
clerkId
);
return
Collections
.
singletonList
(
"-1"
);
}
}
...
...
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