From 79137967309ccf20766e107fae7cb098c2e732a1 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 1 Apr 2019 08:34:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=A5=E4=BE=9D3.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/system/SysDeptController.java | 5 ++--- .../com/ruoyi/web/controller/system/SysMenuController.java | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java index 9bc9e8138..0bd42a54e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java @@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.ResponseBody; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; 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.enums.BusinessType; import com.ruoyi.common.utils.StringUtils; @@ -114,11 +113,11 @@ public class SysDeptController extends BaseController { if (deptService.selectDeptCount(deptId) > 0) { - return error(Type.WARN, "存在下级部门,不允许删除"); + return AjaxResult.warn("存在下级部门,不允许删除"); } if (deptService.checkDeptExistUser(deptId)) { - return error(Type.WARN, "部门存在用户,不允许删除"); + return AjaxResult.warn("部门存在用户,不允许删除"); } return toAjax(deptService.deleteDeptById(deptId)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java index 79fb74ee7..11bd938e5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java @@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.ResponseBody; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; 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.enums.BusinessType; import com.ruoyi.framework.util.ShiroUtils; @@ -62,11 +61,11 @@ public class SysMenuController extends BaseController { if (menuService.selectCountMenuByParentId(menuId) > 0) { - return error(Type.WARN, "存在子菜单,不允许删除"); + return AjaxResult.warn("存在子菜单,不允许删除"); } if (menuService.selectCountRoleMenuByMenuId(menuId) > 0) { - return error(Type.WARN, "菜单已分配,不允许删除"); + return AjaxResult.warn("菜单已分配,不允许删除"); } ShiroUtils.clearCachedAuthorizationInfo(); return toAjax(menuService.deleteMenuById(menuId));