Commit 6d9a67ab authored by 杨日斐's avatar 杨日斐

aserver 菜单栏什么都不显示。

parent b4b69e59
......@@ -179,8 +179,13 @@ public class MenuController extends Controller {
public void getMenuGroup() {
Integer userId = Db.queryInt(Db.getSql("getUserId"), this.getAttrForStr("username"));
// 所有菜单
List<Menu> allMenuList = new Menu().dao().template("getMenuGroup", Kv.by("userId", userId)).find();
String userName = this.getAttrForStr("username");
List<Menu> allMenuList=null ;
if("admin".equals(userName)) {
allMenuList = new Menu().dao().template("getMenuAll").find();
}else {
allMenuList = new Menu().dao().template("getMenuGroup", Kv.by("userId", userId)).find();
}
List<System> systems = System.dao.template("getSystems").find();
Map<Integer, System> systemMap = systems.stream().collect(Collectors.toMap(System::getId, System -> System));
List<MenuStar> stars = MenuStar.dao.template("getMenuStar", userId).find();
......
This diff is collapsed.
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