fix: 菜单授权报错

This commit is contained in:
taojinlong 2022-05-26 18:07:04 +08:00
parent dd2e9a6e6f
commit ac29f9db2b
4 changed files with 17 additions and 2 deletions

View File

@ -55,7 +55,8 @@ public class SysLogConstants {
DEPT(7, "SOURCE_TYPE_DEPT"),
ROLE(8, "SOURCE_TYPE_ROLE"),
DRIVER(9, "SOURCE_TYPE_DRIVER"),
DRIVER_FILE(10, "SOURCE_TYPE_DRIVER_FILE");
DRIVER_FILE(10, "SOURCE_TYPE_DRIVER_FILE"),
MENU(11, "SOURCE_TYPE_MENU");
private Integer value;
private String name;

View File

@ -153,6 +153,17 @@
</where>
</if>
<if test="type == 11">
menu_id as id ,title as name
from sys_menu
<where>
menu_id in
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
#{id}
</foreach>
</where>
</if>
</select>

View File

@ -109,7 +109,7 @@ public class XAuthServer {
return SysLogConstants.SOURCE_TYPE.DATASOURCE;
}
if (StringUtils.equals("menu", sourceType)) {
return SysLogConstants.SOURCE_TYPE.DATASOURCE;
return SysLogConstants.SOURCE_TYPE.MENU;
}
if (StringUtils.equals("dataset", sourceType)) {
return SysLogConstants.SOURCE_TYPE.DATASET;

View File

@ -100,6 +100,9 @@ public class LogManager {
case 7:
typeValue = "dept";
break;
case 11:
typeValue = "menu";
break;
default:
break;
}