Commit b16fa3af by 徐高华

后台权限加eid

parent 92784387
......@@ -258,7 +258,7 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
Long superRoleId = superRoleBO.getRoleId() ;
List<String> superMenuCodeList = this.listRoleMenuCode(allMenuList,wxEnterpriseId, superRoleId);
// 查询gic配置的权限
List<String> gicBuyCodes = this.haobanMenuService.getGicBuyCodes(enterpriseId) ;
List<String> gicBuyCodes = this.haobanMenuService.getGicBuyCodes(enterpriseId,clerkType) ;
if(CollectionUtils.isNotEmpty(gicBuyCodes)) {
superMenuCodeList.addAll(gicBuyCodes) ;
}
......
......@@ -67,7 +67,7 @@ public interface HaobanMenuService {
List<HaobanMenuBO> getHaobanMenuTreeList(String wxEnterpriseId, String enterpriseId, Integer clerkType);
public List<RightMenuDTO> getGicBuyMenus(String enterpriseId) ;
public List<String> getGicBuyCodes(String enterpriseId) ;
public List<String> getGicBuyCodes(String enterpriseId , Integer clerkType) ;
/**
......
......@@ -118,6 +118,7 @@ public class HaobanMenuServiceImpl implements HaobanMenuService {
@Override
public List<RightMenuDTO> getGicBuyMenus(String enterpriseId) {
logger.info("查询gic权限={}",enterpriseId);
if(StringUtils.isBlank(enterpriseId) || "-1".equals(enterpriseId)) {
return null ;
}
......@@ -130,11 +131,14 @@ public class HaobanMenuServiceImpl implements HaobanMenuService {
return list ;
}
// Integer clerkType
@Override
public List<String> getGicBuyCodes(String enterpriseId) {
public List<String> getGicBuyCodes(String enterpriseId , Integer clerkType) {
List<RightMenuDTO> list = this.getGicBuyMenus(enterpriseId) ;
if(CollectionUtils.isNotEmpty(list)) {
return list.stream().map(o->o.getMenuCode()).collect(Collectors.toList());
return list.stream().filter(o->{
return true ;
}).map(o->o.getMenuCode()).collect(Collectors.toList());
}
return null ;
}
......@@ -145,7 +149,7 @@ public class HaobanMenuServiceImpl implements HaobanMenuService {
List<TabHaobanMenu> notPidMenuList = tabHaobanMenuMapper.getHaobanNotPidMenuList(wxEnterpriseId, clerkType, 0);
List<HaobanMenuBO> pidMenuBOList = EntityUtil.changeEntityListNew(HaobanMenuBO.class, pidMenuList);
List<HaobanMenuBO> notPidMenuBOList = EntityUtil.changeEntityListNew(HaobanMenuBO.class, notPidMenuList);
List<String> gicMenulist = this.getGicBuyCodes(enterpriseId) ;
List<String> gicMenulist = this.getGicBuyCodes(enterpriseId,clerkType) ;
if(CollectionUtils.isNotEmpty(gicMenulist)) {
List<HaobanMenuBO> allMenuList = this.getAllMenuList();
Map<String,HaobanMenuBO> map = allMenuList.stream().collect(Collectors.toMap(HaobanMenuBO::getMenuCode,o->o,(k1,k2)->k1)) ;
......
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