Sfoglia il codice sorgente

角色权限admin添加

4.0
ht 2 anni fa
parent
commit
b148e4d35b
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java

+ 2
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java Vedi File

@@ -38,7 +38,7 @@ public class PreviewMenuTreeService {
List<MenuVO> menuVOList = buildMenu(prj_id, module, us,home);
if (!CommUtil.isEmpty(menuVOList)) {
R r = R.success(menuVOList);
if(home.getId()>0){
if(home.getId()!=null&&home.getId()>0){
r.put("home",home);
}
return r;
@@ -85,7 +85,7 @@ public class PreviewMenuTreeService {
}

public List<MenuVO> buildMenu(String prj_id, String module, UserSession us,MenuVO home) {
Set<MenuPlan> set = RoleHelper.getMenuPlans(us.getUserId(),us.getPartyId());
Set<MenuPlan> set = RoleHelper.isAdmin(us.getUserId()) ? MenuPlanCache.getInstance().getByP(prj_id):RoleHelper.getMenuPlans(us.getUserId(),us.getPartyId());
if (CommUtil.isEmpty(set)) {
return new ArrayList<>();
}


Caricamento…
Annulla
Salva