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
0ed25011
Commit
0ed25011
authored
May 18, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:新增该门店好办是否有权限接口
parent
f959cb0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
7 deletions
+50
-7
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+13
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+37
-7
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
0ed25011
...
...
@@ -268,6 +268,19 @@ public interface StaffApiService {
* @date 2022-05-09 16:34:56
*/
List
<
String
>
getHaoBanStoreRolesByStoreWidgetId
(
String
storeWidgetId
,
String
enterpriseId
);
/**
* 该门店好办是否有权限 true有,false 否
*
* @param storeId 存储id
* @param enterpriseId 企业标识
* @param wxEnterpriseId wx企业标识
* @return boolean
* @author mozhu
* @date 2022-05-18 14:19:11
*/
boolean
isFlagByStoreIdAndEnterpriseId
(
String
storeId
,
String
enterpriseId
,
String
wxEnterpriseId
);
public
void
updateDefaultGicEid
(
String
staffid
,
String
gicEnterpriseId
)
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
0ed25011
...
...
@@ -15,6 +15,7 @@ import com.gic.commons.util.GlobalVar;
import
com.gic.commons.util.ImageUtil
;
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.StoreGroupService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
...
...
@@ -404,6 +405,7 @@ public class StaffApiServiceImpl implements StaffApiService {
/**
* 获取wxopenid
*
* @param userId
* @param corpid
* @return
...
...
@@ -1112,8 +1114,8 @@ public class StaffApiServiceImpl implements StaffApiService {
}
@Override
public
List
<
StaffDTO
>
listByWxUserId
(
String
wxUserId
,
String
wxEnterpriseId
)
{
List
<
TabHaobanStaff
>
list
=
staffMapper
.
listByWxUserId
(
wxUserId
,
wxEnterpriseId
);
public
List
<
StaffDTO
>
listByWxUserId
(
String
wxUserId
,
String
wxEnterpriseId
)
{
List
<
TabHaobanStaff
>
list
=
staffMapper
.
listByWxUserId
(
wxUserId
,
wxEnterpriseId
);
return
EntityUtil
.
changeEntityListByJSON
(
StaffDTO
.
class
,
list
);
}
...
...
@@ -1312,6 +1314,13 @@ public class StaffApiServiceImpl implements StaffApiService {
return
enterpriseIdStoreIds
;
}
List
<
String
>
gicStoreIds
=
getStoreIdList
(
clerkId
);
if
(
CollectionUtils
.
isEmpty
(
gicStoreIds
))
{
return
Collections
.
emptyList
();
}
if
(
gicStoreIds
.
contains
(
"-1"
))
{
//gic管理员返回好办企业
return
enterpriseIdStoreIds
;
}
//取交集
Sets
.
SetView
<
String
>
intersection
=
Sets
.
intersection
(
Sets
.
newHashSet
(
enterpriseIdStoreIds
),
Sets
.
newHashSet
(
gicStoreIds
));
return
intersection
.
stream
().
collect
(
Collectors
.
toList
());
...
...
@@ -1331,6 +1340,15 @@ public class StaffApiServiceImpl implements StaffApiService {
return
intersection
.
stream
().
collect
(
Collectors
.
toList
());
}
@Override
public
boolean
isFlagByStoreIdAndEnterpriseId
(
String
storeId
,
String
enterpriseId
,
String
wxEnterpriseId
)
{
List
<
String
>
enterpriseIdStoreIds
=
storeRangeService
.
listStoreIdByWxEnterpriseId
(
enterpriseId
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
enterpriseIdStoreIds
))
{
return
false
;
}
return
enterpriseIdStoreIds
.
contains
(
storeId
);
}
/**
* 门店筛选器id企业端获取gic门店id列表
*
...
...
@@ -1340,12 +1358,23 @@ 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
();
}
return
getStoreWidgetIdStoreIds
(
clerkDetail
.
getStoreWidgetId
(),
clerkDetail
.
getEnterpriseId
());
String
storeWidgetId
=
clerkDetail
.
getStoreWidgetId
();
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidgetBykey
(
storeWidgetId
);
if
(
storeWidgetDTO
==
null
)
{
return
Collections
.
emptyList
();
}
Integer
selectType
=
storeWidgetDTO
.
getSelectType
();
if
(
selectType
==
0
)
{
//gic超管
List
<
String
>
all
=
new
ArrayList
<>();
all
.
add
(
"-1"
);
return
all
;
}
return
getStoreWidgetIdStoreIds
(
storeWidgetId
,
clerkDetail
.
getEnterpriseId
());
}
/**
...
...
@@ -1357,7 +1386,7 @@ public class StaffApiServiceImpl implements StaffApiService {
* @author mozhu
* @date 2022-05-09 16:43:50
*/
private
List
<
String
>
getStoreWidgetIdStoreIds
(
String
storeWidgetId
,
String
enterpriseId
)
{
private
List
<
String
>
getStoreWidgetIdStoreIds
(
String
storeWidgetId
,
String
enterpriseId
)
{
// 门店id列表
List
<
String
>
storeIdList
=
storeWidgetService
.
getStoreWidgetStore
(
storeWidgetId
,
enterpriseId
,
null
,
null
,
2
);
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
...
...
@@ -1366,8 +1395,9 @@ public class StaffApiServiceImpl implements StaffApiService {
logger
.
info
(
"门店筛选器查询结果:{}"
,
JSON
.
toJSONString
(
storeIdList
));
return
storeIdList
;
}
public
void
updateDefaultGicEid
(
String
staffid
,
String
gicEnterpriseId
)
{
@Override
public
void
updateDefaultGicEid
(
String
staffid
,
String
gicEnterpriseId
)
{
this
.
staffService
.
updateDefaultGicEid
(
staffid
,
gicEnterpriseId
);
}
}
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