Commit b4bd2720 by 徐高华

门店分组

parent 8799b565
......@@ -110,7 +110,6 @@ public class GicDepartmentController extends WebBaseController{
if(CollectionUtils.isNotEmpty(idList)) {
this.addSubGroup(enterpriseId, idList, retList);
}
logger.info("有权限的列表={}",otherList);
for(PowerStoreGroupDTO item : departmentList) {
String groupId = item.getStoreGroupId() ;
if(idList.contains(groupId)) {
......@@ -131,8 +130,7 @@ public class GicDepartmentController extends WebBaseController{
}
return resultResponse(HaoBanErrCode.ERR_1,retList);
}
// 增加所有子分组
private void addSubGroup(String enterpriseId , List<String> idList , List<HaobanStoreGroupVO> retList) {
String[] arr = new String[idList.size()] ;
for(int i=0;i<idList.size();i++) {
......@@ -141,10 +139,13 @@ public class GicDepartmentController extends WebBaseController{
List<StoreGroupDTO> list = this.storeGroupService.listStoreGroupAndChildren(arr,enterpriseId) ;
if(CollectionUtils.isNotEmpty(list)) {
List<HaobanStoreGroupVO> voList = EntityUtil.changeEntityListByOrika(HaobanStoreGroupVO.class, list) ;
voList.forEach(dto->{
dto.setHasRight(true);
});
retList.addAll(voList) ;
for(HaobanStoreGroupVO item : voList) {
if(!idList.contains(item.getStoreGroupId())) {
item.setHasRight(true);
retList.add(item) ;
idList.add(item.getStoreGroupId()) ;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment