mirror of https://gitee.com/y_project/RuoYi.git
parent
87b7e8665a
commit
7913796730
|
@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult.Type;
|
|
||||||
import com.ruoyi.common.core.domain.Ztree;
|
import com.ruoyi.common.core.domain.Ztree;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
@ -114,11 +113,11 @@ public class SysDeptController extends BaseController
|
||||||
{
|
{
|
||||||
if (deptService.selectDeptCount(deptId) > 0)
|
if (deptService.selectDeptCount(deptId) > 0)
|
||||||
{
|
{
|
||||||
return error(Type.WARN, "存在下级部门,不允许删除");
|
return AjaxResult.warn("存在下级部门,不允许删除");
|
||||||
}
|
}
|
||||||
if (deptService.checkDeptExistUser(deptId))
|
if (deptService.checkDeptExistUser(deptId))
|
||||||
{
|
{
|
||||||
return error(Type.WARN, "部门存在用户,不允许删除");
|
return AjaxResult.warn("部门存在用户,不允许删除");
|
||||||
}
|
}
|
||||||
return toAjax(deptService.deleteDeptById(deptId));
|
return toAjax(deptService.deleteDeptById(deptId));
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult.Type;
|
|
||||||
import com.ruoyi.common.core.domain.Ztree;
|
import com.ruoyi.common.core.domain.Ztree;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
|
@ -62,11 +61,11 @@ public class SysMenuController extends BaseController
|
||||||
{
|
{
|
||||||
if (menuService.selectCountMenuByParentId(menuId) > 0)
|
if (menuService.selectCountMenuByParentId(menuId) > 0)
|
||||||
{
|
{
|
||||||
return error(Type.WARN, "存在子菜单,不允许删除");
|
return AjaxResult.warn("存在子菜单,不允许删除");
|
||||||
}
|
}
|
||||||
if (menuService.selectCountRoleMenuByMenuId(menuId) > 0)
|
if (menuService.selectCountRoleMenuByMenuId(menuId) > 0)
|
||||||
{
|
{
|
||||||
return error(Type.WARN, "菜单已分配,不允许删除");
|
return AjaxResult.warn("菜单已分配,不允许删除");
|
||||||
}
|
}
|
||||||
ShiroUtils.clearCachedAuthorizationInfo();
|
ShiroUtils.clearCachedAuthorizationInfo();
|
||||||
return toAjax(menuService.deleteMenuById(menuId));
|
return toAjax(menuService.deleteMenuById(menuId));
|
||||||
|
|
Loading…
Reference in New Issue