Commit 5ef7ab6b authored by 张龙发's avatar 张龙发

还原获取菜单方法

parent 75e4395b
......@@ -35,7 +35,7 @@ public class MenuController extends Controller {
public void index() {
String username = this.getAttrForStr("username");
Integer userId = Db.queryInt(Db.getSql("getUserId"), username);
List<System> systems = System.dao.template("getSystems", Kv.by("username", username)).find();
List<System> systems = System.dao.template("getSystems").find();
Kv kvSystems = CollectionUtil.toIntMap(systems, "ID");
List<Menu> menus = null;
if ("admin".equals(username)) {
......@@ -58,6 +58,7 @@ public class MenuController extends Controller {
this.renderJson(Ret.ok("apps", systems));
}
/**
* 获取菜单列表
*/
......
......@@ -38,11 +38,10 @@ select * from AS_USER where USERNAME=#para(0)
### 获取系统,应用菜单使用
#sql("getSystems")
select sys.id as ID,sys.NAME as NAME,sys.TITLE as TITLE, sys.TYPE as TYPE, sys.URL as URL, sys.DESCRIPTION as DESCRIPTION
from AS_SYSTEM sys left join as_menu me on sys.id=me.system_id where me.id in (select menu_id from as_role_menu where role_id in(select role_id from as_role_user where user_id =(select id from as_user where username='#(username)')))
group by sys.id,sys.NAME,sys.TITLE,sys.TYPE,sys.URL,sys.DESCRIPTION order by sys.ID
select ID, NAME, TITLE, TYPE, URL, DESCRIPTION from AS_SYSTEM order by ID
#end
### 获取系统
#sql("findSystemList")
select * from AS_SYSTEM t
......
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