优化代码

This commit is contained in:
RuoYi
2022-06-13 21:43:11 +08:00
parent 98fc30786e
commit eab1b450d5
5 changed files with 66 additions and 67 deletions

View File

@ -259,7 +259,7 @@ public class SysMenuServiceImpl implements ISysMenuService
public boolean hasChildByMenuId(Long menuId)
{
int result = menuMapper.hasChildByMenuId(menuId);
return result > 0 ? true : false;
return result > 0;
}
/**
@ -272,7 +272,7 @@ public class SysMenuServiceImpl implements ISysMenuService
public boolean checkMenuExistRole(Long menuId)
{
int result = roleMenuMapper.checkMenuExistRole(menuId);
return result > 0 ? true : false;
return result > 0;
}
/**

View File

@ -381,7 +381,7 @@ public class SysUserServiceImpl implements ISysUserService
*/
public void insertUserRole(SysUser user)
{
this.insertUserRole(user.getUserId, user.getRoleIds());
this.insertUserRole(user.getUserId(), user.getRoleIds());
}
/**