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
d82ab25e
Commit
d82ab25e
authored
May 30, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店分组
parent
5b1c3c3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
GicDepartmentController.java
...haoban/manage/web/controller/GicDepartmentController.java
+19
-2
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/GicDepartmentController.java
View file @
d82ab25e
...
...
@@ -21,6 +21,7 @@ import com.gic.clerk.api.dto.ClerkDTO;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.dto.PowerStoreGroupDTO
;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
import
com.gic.enterprise.api.dto.StoreWidgetDTO
;
import
com.gic.enterprise.api.dto.StoreWidgetRightDataDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
...
...
@@ -95,6 +96,7 @@ public class GicDepartmentController extends WebBaseController{
if
(
idList
.
contains
(
item
.
getStoreGroupId
()))
{
HaobanStoreGroupVO
vo
=
EntityUtil
.
changeEntityByOrika
(
HaobanStoreGroupVO
.
class
,
item
)
;
vo
.
setHasRight
(
true
);
this
.
addSubGroup
(
enterpriseId
,
vo
.
getStoreGroupId
(),
retList
);
retList
.
add
(
vo
)
;
String
chain
=
item
.
getStoreGroupChain
()
;
String
[]
arr
=
chain
.
split
(
"_"
)
;
...
...
@@ -108,7 +110,11 @@ public class GicDepartmentController extends WebBaseController{
}
logger
.
info
(
"有权限的列表={}"
,
otherList
);
for
(
PowerStoreGroupDTO
item
:
departmentList
)
{
if
(
otherList
.
contains
(
item
.
getStoreGroupId
())
&&
!
idList
.
contains
(
item
.
getStoreGroupId
()))
{
String
groupId
=
item
.
getStoreGroupId
()
;
if
(
idList
.
contains
(
groupId
))
{
continue
;
}
if
(
otherList
.
contains
(
groupId
))
{
HaobanStoreGroupVO
vo
=
EntityUtil
.
changeEntityByOrika
(
HaobanStoreGroupVO
.
class
,
item
)
;
idList
.
add
(
vo
.
getStoreGroupId
());
retList
.
add
(
vo
)
;
...
...
@@ -122,7 +128,18 @@ public class GicDepartmentController extends WebBaseController{
});
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
retList
);
}
private
void
addSubGroup
(
String
enterpriseId
,
String
parentGroupId
,
List
<
HaobanStoreGroupVO
>
retList
)
{
List
<
StoreGroupDTO
>
list
=
this
.
storeGroupService
.
getStoreGroupList
(
enterpriseId
,
null
,
parentGroupId
)
;
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
List
<
HaobanStoreGroupVO
>
voList
=
EntityUtil
.
changeEntityListByOrika
(
HaobanStoreGroupVO
.
class
,
list
)
;
voList
.
forEach
(
dto
->{
dto
.
setHasRight
(
true
);
});
retList
.
addAll
(
voList
)
;
}
}
@RequestMapping
(
"gic-store-group-list"
)
...
...
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