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();
......
......@@ -65,6 +65,11 @@ select * from AS_CONFIG AC
select * from AS_MENU_STAR where USER_ID=#para(0)
#end
### 超级用户所有菜单
#sql("getMenuAll")
select * from AS_MENU order by GROUP_ORDER DESC;
#end
### 获取用户
#sql("getUserId")
select ID from AS_USER where USERNAME=? and rownum =1
......
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