修改部门-添加验证

pull/108/head
ucer 5 years ago
parent 05331eb99d
commit a9e300d063

@ -108,6 +108,12 @@ public class SysDeptController extends BaseController
{
return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
if(dept.getParentId().equals(dept.getDeptId()))
{
return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
}
dept.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(deptService.updateDept(dept));
}

Loading…
Cancel
Save