mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-28 20:41:56 +08:00
简化逻辑判断
This commit is contained in:
@@ -139,7 +139,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|||||||
public boolean hasChildByDeptId(Long deptId)
|
public boolean hasChildByDeptId(Long deptId)
|
||||||
{
|
{
|
||||||
int result = deptMapper.hasChildByDeptId(deptId);
|
int result = deptMapper.hasChildByDeptId(deptId);
|
||||||
return result > 0 ? true : false;
|
return result > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
public boolean hasChildByMenuId(Long menuId)
|
public boolean hasChildByMenuId(Long menuId)
|
||||||
{
|
{
|
||||||
int result = menuMapper.hasChildByMenuId(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)
|
public boolean checkMenuExistRole(Long menuId)
|
||||||
{
|
{
|
||||||
int result = roleMenuMapper.checkMenuExistRole(menuId);
|
int result = roleMenuMapper.checkMenuExistRole(menuId);
|
||||||
return result > 0 ? true : false;
|
return result > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user