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
ed228a25
Commit
ed228a25
authored
May 26, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://git.gicdev.com/haoban3.0/haoban-manage3.0.git
into developer
parents
f0e8fb24
65ad96e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
13 deletions
+37
-13
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+37
-13
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
ed228a25
...
...
@@ -13,9 +13,11 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.commons.util.ImageUtil
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
import
com.gic.enterprise.api.dto.StoreWidgetDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreGroupService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
...
...
@@ -105,6 +107,8 @@ public class StaffApiServiceImpl implements StaffApiService {
private
StoreRangeService
storeRangeService
;
@Autowired
private
WxEnterpriseRelatedMapper
wxEnterpriseRelatedMapper
;
@Autowired
private
EnterpriseService
enterpriseService
;
@Override
public
StaffDTO
selectById
(
String
staffId
)
{
...
...
@@ -1314,6 +1318,7 @@ public class StaffApiServiceImpl implements StaffApiService {
logger
.
info
(
"gic门店为空"
);
return
Collections
.
emptyList
();
}
logger
.
info
(
"gic门店数量:{}"
,
gicStoreIds
.
size
());
if
(
gicStoreIds
.
contains
(
"-1"
))
{
//gic管理员返回好办企业
return
enterpriseIdStoreIds
;
...
...
@@ -1357,23 +1362,42 @@ public class StaffApiServiceImpl implements StaffApiService {
* @date 2022-05-06 16:00:05
*/
private
List
<
String
>
getStoreIdList
(
String
clerkId
)
{
PowerClerkDTO
clerkDetail
=
powerService
.
getClerkDetail
(
clerkId
);
if
(
clerkDetail
==
null
)
{
return
Collections
.
emptyList
();
}
String
storeWidgetId
=
clerkDetail
.
getStoreWidgetId
();
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidgetBykey
(
storeWidgetId
);
if
(
storeWidgetDTO
==
null
)
{
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
==
null
)
{
logger
.
info
(
"导购不存在"
);
return
Collections
.
emptyList
();
}
Integer
selectType
=
storeWidgetDTO
.
getSelectType
();
if
(
selectType
==
0
)
{
Integer
superAdmin
=
clerkDTO
.
getSuperAdmin
();
if
(
superAdmin
!=
null
&&
superAdmin
==
1
)
{
logger
.
info
(
"gic超管,clerkId:{}"
,
clerkId
);
//gic超管
List
<
String
>
all
=
new
ArrayList
<>();
all
.
add
(
"-1"
);
return
all
;
return
Collections
.
singletonList
(
"-1"
);
}
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
();
EnterpriseSettingDTO
enterpriseSetting
=
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
enterpriseId
);
if
(
enterpriseSetting
.
getEnableAccessControl
()
!=
null
&&
enterpriseSetting
.
getEnableAccessControl
()
==
1
)
{
PowerClerkDTO
clerkDetail
=
powerService
.
getClerkDetail
(
clerkId
);
if
(
clerkDetail
==
null
)
{
logger
.
info
(
"导购不存在"
);
return
Collections
.
emptyList
();
}
String
storeWidgetId
=
clerkDetail
.
getStoreWidgetId
();
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidgetBykey
(
storeWidgetId
);
if
(
storeWidgetDTO
==
null
)
{
logger
.
info
(
"导购权限不存在"
);
return
Collections
.
emptyList
();
}
Integer
selectType
=
storeWidgetDTO
.
getSelectType
();
if
(
selectType
!=
null
&&
selectType
==
0
)
{
//gic超管
logger
.
info
(
"gic超管,clerkId:{}"
,
clerkId
);
return
Collections
.
singletonList
(
"-1"
);
}
return
getStoreWidgetIdStoreIds
(
storeWidgetId
,
enterpriseId
);
}
else
{
//未开启分权
return
Collections
.
singletonList
(
"-1"
);
}
return
getStoreWidgetIdStoreIds
(
storeWidgetId
,
clerkDetail
.
getEnterpriseId
());
}
/**
...
...
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