|
|
|
@ -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)); |
|
|
|
|