Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
aserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
15所TongWeb
aserver
Commits
6d9a67ab
Commit
6d9a67ab
authored
Nov 23, 2020
by
杨日斐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aserver 菜单栏什么都不显示。
parent
b4b69e59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
318 additions
and
307 deletions
+318
-307
MenuController.java
...n/java/com/archser/aserver/controller/MenuController.java
+7
-2
oracle.sql
src/main/resources/oracle.sql
+311
-305
No files found.
src/main/java/com/archser/aserver/controller/MenuController.java
View file @
6d9a67ab
...
...
@@ -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
();
...
...
src/main/resources/oracle.sql
View file @
6d9a67ab
###
SQL
模板
###
获取指定名称的配置
#
sql
(
"getConfigByName"
)
select
val
from
AS_CONFIG
where
NAME
=?
#
end
###
根据
SysId
获取菜单列表
#
sql
(
"getMenuListBySysId"
)
select
*
from
as_menu
where
system_id
=#
(
sysId
)
#
if
(
condStr
)
and
#
(
condStr
)
#
end
#
end
###
获取指定用户
#
sql
(
"getUserByUsername"
)
select
*
from
AS_USER
where
USERNAME
=#
para
(
0
)
#
end
###
删除菜单数据
#
sql
(
"deleteMenuByIds"
)
delete
as_menu
where
id
in
(
#
for
(
item
:
ids
)
#
(
for
.
index
==
0
?
""
:
","
)
#
(
item
)
#
end
)
#
end
###
删除菜单权限表数据
#
sql
(
"deleteRoleMenuByIds"
)
delete
as_role_menu
where
menu_id
in
(
#
for
(
item
:
ids
)
#
(
for
.
index
==
0
?
""
:
","
)
#
(
item
)
#
end
)
#
end
###
获取系统,应用菜单使用
#
sql
(
"getSystems"
)
select
ID
,
NAME
,
TITLE
,
TYPE
,
URL
,
DESCRIPTION
from
AS_SYSTEM
order
by
ID
#
end
###
获取系统
#
sql
(
"findSystemList"
)
select
*
from
AS_SYSTEM
t
#
if
(
searchText
!=
null
&&
searchText
!=
""
&&
searchText
!=
"null"
)
where
t
.
name
like
#
para
(
searchText
)
or
t
.
title
like
#
para
(
searchText
)
or
t
.
service
like
#
para
(
searchText
)
or
t
.
url
like
#
para
(
searchText
)
or
t
.
description
like
#
para
(
searchText
)
or
t
.
type
like
#
para
(
searchText
)
#
end
#
end
#
sql
(
"findConfigList"
)
select
*
from
AS_CONFIG
AC
#
if
(
searchText
!=
null
&&
searchText
!=
""
&&
searchText
!=
"null"
)
where
#
(
searchText
)
#
end
#
end
###
获取加星菜单
#
sql
(
"getMenuStar"
)
select
*
from
AS_MENU_STAR
where
USER_ID
=#
para
(
0
)
#
end
###
获取用户
#
sql
(
"getUserId"
)
select
ID
from
AS_USER
where
USERNAME
=?
and
rownum
=
1
#
end
###
删除加星菜单
#
sql
(
"deleteMenuStar"
)
delete
from
AS_MENU_STAR
where
USER_ID
=#
para
(
userId
)
and
MENU_ID
=#
para
(
menuId
)
#
end
###
获取指定用户
#
sql
(
"getUser"
)
select
*
from
AS_USER
where
"USERNAME"
=#
para
(
0
)
#
end
###
获取指定系统私钥
#
sql
(
"getSystemPrivatekey"
)
select
"TYPE"
,
KEYID
,
PRIVATEKEY
,
URL
,
TITLE
from
AS_SYSTEM
where
"NAME"
=#
para
(
0
)
and
rownum
=
1
#
end
###
获取所有菜单
#
sql
(
"getMenus"
)
select
*
from
AS_MENU
order
by
ID
#
end
###
获取用户权限应用菜单
#
sql
(
"getMenusByUser"
)
select
*
from
AS_MENU
where
ID
in
(
select
MENU_ID
from
AS_ROLE_MENU
where
ROLE_ID
in
(
select
r
.
ID
from
AS_ROLE
r
,
AS_ROLE_USER
ru
where
r
.
ID
=
ru
.
ROLE_ID
and
ru
.
USER_ID
=#
para
(
userId
)
)
)
order
by
GROUP_ORDER
DESC
;
#
end
###
查询用户是否有指定菜单权限
#
sql
(
"findMenuIdByNameAndUserId"
)
select
menu_id
from
as_role_menu
where
role_id
in
(
select
r
.
id
from
as_role
r
,
as_role_user
ru
where
r
.
id
=
ru
.
role_id
and
ru
.
user_id
=
#
para
(
userId
))
and
menu_id
=
(
select
id
from
as_menu
m
where
m
.
name
=
#
para
(
menuName
))
#
end
###
查询菜单根据用户
id
和系统
type
和菜单名称
#
sql
(
"findMenuByUserSystemAndName"
)
select
menu_id
from
as_role_menu
where
role_id
in
(
select
r
.
id
from
as_role
r
,
as_role_user
ru
where
r
.
id
=
ru
.
role_id
and
ru
.
user_id
=
#
para
(
userId
))
and
menu_id
in
(
select
id
from
as_menu
m
where
m
.
system_id
in
(
select
id
from
as_system
sys
where
sys
.
type
=
#
para
(
systemType
))
and
m
.
name
=
#
para
(
menuName
))
#
end
#
sql
(
"findMenuAndSystemIfUserHasRole"
)
select
m
.
id
as
menu_id
,
sys
.
title
as
system
from
as_menu
m
inner
join
as_system
sys
on
m
.
system_id
=
sys
.
id
where
sys
.
type
=
#
para
(
systemType
)
and
m
.
name
=
#
para
(
menuName
)
and
exists
(
select
menu_id
from
as_role_menu
where
menu_id
=
m
.
id
and
role_id
in
(
select
r
.
id
from
as_role
r
,
as_role_user
ru
where
r
.
id
=
ru
.
role_id
and
ru
.
user_id
=
#
para
(
userId
))
)
#
end
#
sql
(
"findMenuBySystemType"
)
select
menu_id
from
as_role_menu
where
role_id
in
(
select
r
.
id
from
as_role
r
,
as_role_user
ru
where
r
.
id
=
ru
.
role_id
and
ru
.
user_id
=
#
para
(
userId
))
and
menu_id
in
(
select
id
from
as_menu
m
where
m
.
system_id
in
(
select
id
from
as_system
sys
where
sys
.
type
=
#
para
(
systemType
))
)
#
end
#
sql
(
"findSystemWithUserPermission"
)
select
sys
.
*
from
as_system
sys
where
sys
.
id
in
(
select
m
.
system_id
from
as_menu
m
where
m
.
id
in
(
select
rm
.
menu_id
from
as_role_menu
rm
where
rm
.
role_id
in
(
select
role_id
from
as_role_user
ru
where
ru
.
user_id
=
#
para
(
userId
)
)
)
group
by
m
.
system_id
)
#
end
###
获取调试信息日志
#
sql
(
"getLogs"
)
select
ag
.
ID
,
CODE
,
TYPE
,
CONTENT
,
URL
,
au
.
USERNAME
,
CREATE_TIME
as
TIME
from
AS_LOG
ag
,
as_user
au
where
#
(
condition
)
and
ag
.
type
=
'ajax'
AND
ag
.
user_id
=
au
.
id
order
by
ag
.
ID
desc
#
end
###
获取用户角色关系
#
sql
(
"getRole"
)
SELECT
*
from
AS_ROLE
where
ID
in
(
#
for
(
item
:
ids
)
#
(
for
.
index
==
0
?
""
:
","
)
#
(
item
)
#
end
)
#
end
###
拥有三员角色的用户数
#
sql
(
"hasThreeMemberUsersCount"
)
select
count
(
id
)
from
as_role_user
where
role_id
in
(
select
id
from
as_role
where
name
=
'Sysadmin'
or
name
=
'Secadmin'
or
name
=
'Audadmin'
)
#
end
###
用户拥有的非锁定的角色个数
#
sql
(
"hasNoLockedRolesCount"
)
select
count
(
id
)
from
as_role
where
id
in
(
select
role_id
from
as_role_user
where
user_id
=
(
select
id
from
as_user
where
username
=?
))
and
locked
=
'N'
#
end
###
查询访问的系统名称
#
sql
(
"findSystemTitleByType"
)
select
title
from
as_system
where
"TYPE"
=?
and
rownum
=
1
#
end
###
查询错误次数
#
sql
(
"getErrorCount"
)
select
decode
(
trunc
(
last_login_time
),
trunc
(
sysdate
),
case
when
(
sysdate
-
last_login_time
)
*
24
>
#
para
(
hour
)
and
errorcount
>=
#
para
(
permitLoginTimes
)
then
1
else
errorcount
end
,
1
)
"flag"
from
as_user
where
id
=#
para
(
id
)
#
end
###
更改错误次数和最后登录时间
#
sql
(
"updateForErr"
)
update
as_user
set
errorcount
=
decode
(
trunc
(
last_login_time
),
trunc
(
sysdate
),
case
when
(
sysdate
-
last_login_time
)
*
24
>
#
para
(
hour
)
and
errorcount
>=
#
para
(
permitLoginTimes
)
then
1
else
errorcount
+
1
end
,
1
),
last_login_time
=
sysdate
where
id
=#
para
(
id
)
#
end
###
当密码正确时查询错误次数
###
xiaoying
20200406
缺陷
YZJ
-
2598
修改登录成功问题
#
sql
(
"checkWhenPwdOk"
)
select
case
when
trunc
(
last_login_time
)
!=
trunc
(
sysdate
)
then
0
when
#
(
hour
)
/
24
<
sysdate
-
last_login_time
and
errorcount
>=
#
(
permitLoginTimes
)
then
errorcount
else
0
end
"flag"
from
as_user
where
id
=#
(
id
)
#
end
###
通过
keyId
得到密钥
#
sql
(
"getPublickeyByKeyId"
)
select
publickey
from
as_system
where
keyid
=?
and
rownum
=
1
#
end
###
错误次数清零
#
sql
(
"updateForOk"
)
update
as_user
set
errorcount
=
0
,
last_login_time
=
sysdate
where
id
=#
(
id
)
and
errorcount
!=
0
#
end
--修改密码
#
sql
(
"updatePassword"
)
UPDATE
AS_USER
set
PASSWORD
=
?
WHERE
USERNAME
=
?
#
end
##
根据用户
ID
查询角色
#
sql
(
"getRolesByUserId"
)
select
ROLE_ID
from
AS_ROLE_USER
WHERE
USER_ID
=
?
#
end
###
获取用户信息通过
personCode
#
sql
(
"getUserByPersonCode"
)
select
*
from
AS_USER
where
DC_PERSONCODE
=
#
para
(
personCode
)
#
end
###
更新配置表的值
#
sql
(
"updateConfigVal"
)
UPDATE
AS_CONFIG
set
VAL
=
?
WHERE
NAME
=
?
#
end
###
根据用户
id
和系统
Id
查找菜单
xiaoying
20200414
YZJ
-
2725
隐藏菜单无法登录问题
#
sql
(
"findMenuByUserIdAndSysId"
)
select
*
from
AS_MENU
where
ID
in
(
select
MENU_ID
from
AS_ROLE_MENU
where
ROLE_ID
in
(
select
r
.
ID
from
AS_ROLE
r
,
AS_ROLE_USER
ru
where
r
.
ID
=
ru
.
ROLE_ID
and
ru
.
USER_ID
=#
para
(
userId
)
)
)
and
system_id
=#
para
(
systemId
)
order
by
ID
#
end
###
获取三级菜单
#
sql
(
"getMenuGroup"
)
select
*
from
AS_MENU
where
ID
in
(
select
MENU_ID
from
AS_ROLE_MENU
where
ROLE_ID
in
(
select
r
.
ID
from
AS_ROLE
r
,
AS_ROLE_USER
ru
where
r
.
ID
=
ru
.
ROLE_ID
and
ru
.
USER_ID
=#
para
(
userId
)
)
)
order
by
GROUP_ORDER
DESC
;
#
end
#
include
(
"message.sql"
)
#
sql
(
"getSetPassword"
)
select
*
from
AS_SET_PASSWORD
where
id
=
'1'
###
SQL
模板
###
获取指定名称的配置
#
sql
(
"getConfigByName"
)
select
val
from
AS_CONFIG
where
NAME
=?
#
end
###
根据
SysId
获取菜单列表
#
sql
(
"getMenuListBySysId"
)
select
*
from
as_menu
where
system_id
=#
(
sysId
)
#
if
(
condStr
)
and
#
(
condStr
)
#
end
#
end
###
获取指定用户
#
sql
(
"getUserByUsername"
)
select
*
from
AS_USER
where
USERNAME
=#
para
(
0
)
#
end
###
删除菜单数据
#
sql
(
"deleteMenuByIds"
)
delete
as_menu
where
id
in
(
#
for
(
item
:
ids
)
#
(
for
.
index
==
0
?
""
:
","
)
#
(
item
)
#
end
)
#
end
###
删除菜单权限表数据
#
sql
(
"deleteRoleMenuByIds"
)
delete
as_role_menu
where
menu_id
in
(
#
for
(
item
:
ids
)
#
(
for
.
index
==
0
?
""
:
","
)
#
(
item
)
#
end
)
#
end
###
获取系统,应用菜单使用
#
sql
(
"getSystems"
)
select
ID
,
NAME
,
TITLE
,
TYPE
,
URL
,
DESCRIPTION
from
AS_SYSTEM
order
by
ID
#
end
###
获取系统
#
sql
(
"findSystemList"
)
select
*
from
AS_SYSTEM
t
#
if
(
searchText
!=
null
&&
searchText
!=
""
&&
searchText
!=
"null"
)
where
t
.
name
like
#
para
(
searchText
)
or
t
.
title
like
#
para
(
searchText
)
or
t
.
service
like
#
para
(
searchText
)
or
t
.
url
like
#
para
(
searchText
)
or
t
.
description
like
#
para
(
searchText
)
or
t
.
type
like
#
para
(
searchText
)
#
end
#
end
#
sql
(
"findConfigList"
)
select
*
from
AS_CONFIG
AC
#
if
(
searchText
!=
null
&&
searchText
!=
""
&&
searchText
!=
"null"
)
where
#
(
searchText
)
#
end
#
end
###
获取加星菜单
#
sql
(
"getMenuStar"
)
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
#
end
###
删除加星菜单
#
sql
(
"deleteMenuStar"
)
delete
from
AS_MENU_STAR
where
USER_ID
=#
para
(
userId
)
and
MENU_ID
=#
para
(
menuId
)
#
end
###
获取指定用户
#
sql
(
"getUser"
)
select
*
from
AS_USER
where
"USERNAME"
=#
para
(
0
)
#
end
###
获取指定系统私钥
#
sql
(
"getSystemPrivatekey"
)
select
"TYPE"
,
KEYID
,
PRIVATEKEY
,
URL
,
TITLE
from
AS_SYSTEM
where
"NAME"
=#
para
(
0
)
and
rownum
=
1
#
end
###
获取所有菜单
#
sql
(
"getMenus"
)
select
*
from
AS_MENU
order
by
ID
#
end
###
获取用户权限应用菜单
#
sql
(
"getMenusByUser"
)
select
*
from
AS_MENU
where
ID
in
(
select
MENU_ID
from
AS_ROLE_MENU
where
ROLE_ID
in
(
select
r
.
ID
from
AS_ROLE
r
,
AS_ROLE_USER
ru
where
r
.
ID
=
ru
.
ROLE_ID
and
ru
.
USER_ID
=#
para
(
userId
)
)
)
order
by
GROUP_ORDER
DESC
;
#
end
###
查询用户是否有指定菜单权限
#
sql
(
"findMenuIdByNameAndUserId"
)
select
menu_id
from
as_role_menu
where
role_id
in
(
select
r
.
id
from
as_role
r
,
as_role_user
ru
where
r
.
id
=
ru
.
role_id
and
ru
.
user_id
=
#
para
(
userId
))
and
menu_id
=
(
select
id
from
as_menu
m
where
m
.
name
=
#
para
(
menuName
))
#
end
###
查询菜单根据用户
id
和系统
type
和菜单名称
#
sql
(
"findMenuByUserSystemAndName"
)
select
menu_id
from
as_role_menu
where
role_id
in
(
select
r
.
id
from
as_role
r
,
as_role_user
ru
where
r
.
id
=
ru
.
role_id
and
ru
.
user_id
=
#
para
(
userId
))
and
menu_id
in
(
select
id
from
as_menu
m
where
m
.
system_id
in
(
select
id
from
as_system
sys
where
sys
.
type
=
#
para
(
systemType
))
and
m
.
name
=
#
para
(
menuName
))
#
end
#
sql
(
"findMenuAndSystemIfUserHasRole"
)
select
m
.
id
as
menu_id
,
sys
.
title
as
system
from
as_menu
m
inner
join
as_system
sys
on
m
.
system_id
=
sys
.
id
where
sys
.
type
=
#
para
(
systemType
)
and
m
.
name
=
#
para
(
menuName
)
and
exists
(
select
menu_id
from
as_role_menu
where
menu_id
=
m
.
id
and
role_id
in
(
select
r
.
id
from
as_role
r
,
as_role_user
ru
where
r
.
id
=
ru
.
role_id
and
ru
.
user_id
=
#
para
(
userId
))
)
#
end
#
sql
(
"findMenuBySystemType"
)
select
menu_id
from
as_role_menu
where
role_id
in
(
select
r
.
id
from
as_role
r
,
as_role_user
ru
where
r
.
id
=
ru
.
role_id
and
ru
.
user_id
=
#
para
(
userId
))
and
menu_id
in
(
select
id
from
as_menu
m
where
m
.
system_id
in
(
select
id
from
as_system
sys
where
sys
.
type
=
#
para
(
systemType
))
)
#
end
#
sql
(
"findSystemWithUserPermission"
)
select
sys
.
*
from
as_system
sys
where
sys
.
id
in
(
select
m
.
system_id
from
as_menu
m
where
m
.
id
in
(
select
rm
.
menu_id
from
as_role_menu
rm
where
rm
.
role_id
in
(
select
role_id
from
as_role_user
ru
where
ru
.
user_id
=
#
para
(
userId
)
)
)
group
by
m
.
system_id
)
#
end
###
获取调试信息日志
#
sql
(
"getLogs"
)
select
ag
.
ID
,
CODE
,
TYPE
,
CONTENT
,
URL
,
au
.
USERNAME
,
CREATE_TIME
as
TIME
from
AS_LOG
ag
,
as_user
au
where
#
(
condition
)
and
ag
.
type
=
'ajax'
AND
ag
.
user_id
=
au
.
id
order
by
ag
.
ID
desc
#
end
###
获取用户角色关系
#
sql
(
"getRole"
)
SELECT
*
from
AS_ROLE
where
ID
in
(
#
for
(
item
:
ids
)
#
(
for
.
index
==
0
?
""
:
","
)
#
(
item
)
#
end
)
#
end
###
拥有三员角色的用户数
#
sql
(
"hasThreeMemberUsersCount"
)
select
count
(
id
)
from
as_role_user
where
role_id
in
(
select
id
from
as_role
where
name
=
'Sysadmin'
or
name
=
'Secadmin'
or
name
=
'Audadmin'
)
#
end
###
用户拥有的非锁定的角色个数
#
sql
(
"hasNoLockedRolesCount"
)
select
count
(
id
)
from
as_role
where
id
in
(
select
role_id
from
as_role_user
where
user_id
=
(
select
id
from
as_user
where
username
=?
))
and
locked
=
'N'
#
end
###
查询访问的系统名称
#
sql
(
"findSystemTitleByType"
)
select
title
from
as_system
where
"TYPE"
=?
and
rownum
=
1
#
end
###
查询错误次数
#
sql
(
"getErrorCount"
)
select
decode
(
trunc
(
last_login_time
),
trunc
(
sysdate
),
case
when
(
sysdate
-
last_login_time
)
*
24
>
#
para
(
hour
)
and
errorcount
>=
#
para
(
permitLoginTimes
)
then
1
else
errorcount
end
,
1
)
"flag"
from
as_user
where
id
=#
para
(
id
)
#
end
###
更改错误次数和最后登录时间
#
sql
(
"updateForErr"
)
update
as_user
set
errorcount
=
decode
(
trunc
(
last_login_time
),
trunc
(
sysdate
),
case
when
(
sysdate
-
last_login_time
)
*
24
>
#
para
(
hour
)
and
errorcount
>=
#
para
(
permitLoginTimes
)
then
1
else
errorcount
+
1
end
,
1
),
last_login_time
=
sysdate
where
id
=#
para
(
id
)
#
end
###
当密码正确时查询错误次数
###
xiaoying
20200406
缺陷
YZJ
-
2598
修改登录成功问题
#
sql
(
"checkWhenPwdOk"
)
select
case
when
trunc
(
last_login_time
)
!=
trunc
(
sysdate
)
then
0
when
#
(
hour
)
/
24
<
sysdate
-
last_login_time
and
errorcount
>=
#
(
permitLoginTimes
)
then
errorcount
else
0
end
"flag"
from
as_user
where
id
=#
(
id
)
#
end
###
通过
keyId
得到密钥
#
sql
(
"getPublickeyByKeyId"
)
select
publickey
from
as_system
where
keyid
=?
and
rownum
=
1
#
end
###
错误次数清零
#
sql
(
"updateForOk"
)
update
as_user
set
errorcount
=
0
,
last_login_time
=
sysdate
where
id
=#
(
id
)
and
errorcount
!=
0
#
end
--修改密码
#
sql
(
"updatePassword"
)
UPDATE
AS_USER
set
PASSWORD
=
?
WHERE
USERNAME
=
?
#
end
##
根据用户
ID
查询角色
#
sql
(
"getRolesByUserId"
)
select
ROLE_ID
from
AS_ROLE_USER
WHERE
USER_ID
=
?
#
end
###
获取用户信息通过
personCode
#
sql
(
"getUserByPersonCode"
)
select
*
from
AS_USER
where
DC_PERSONCODE
=
#
para
(
personCode
)
#
end
###
更新配置表的值
#
sql
(
"updateConfigVal"
)
UPDATE
AS_CONFIG
set
VAL
=
?
WHERE
NAME
=
?
#
end
###
根据用户
id
和系统
Id
查找菜单
xiaoying
20200414
YZJ
-
2725
隐藏菜单无法登录问题
#
sql
(
"findMenuByUserIdAndSysId"
)
select
*
from
AS_MENU
where
ID
in
(
select
MENU_ID
from
AS_ROLE_MENU
where
ROLE_ID
in
(
select
r
.
ID
from
AS_ROLE
r
,
AS_ROLE_USER
ru
where
r
.
ID
=
ru
.
ROLE_ID
and
ru
.
USER_ID
=#
para
(
userId
)
)
)
and
system_id
=#
para
(
systemId
)
order
by
ID
#
end
###
获取三级菜单
#
sql
(
"getMenuGroup"
)
select
*
from
AS_MENU
where
ID
in
(
select
MENU_ID
from
AS_ROLE_MENU
where
ROLE_ID
in
(
select
r
.
ID
from
AS_ROLE
r
,
AS_ROLE_USER
ru
where
r
.
ID
=
ru
.
ROLE_ID
and
ru
.
USER_ID
=#
para
(
userId
)
)
)
order
by
GROUP_ORDER
DESC
;
#
end
#
include
(
"message.sql"
)
#
sql
(
"getSetPassword"
)
select
*
from
AS_SET_PASSWORD
where
id
=
'1'
#
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment