作者 tangxvhui

bug 修复

... ... @@ -174,12 +174,15 @@ func DepartmentEdit(param protocol.RequestDepartmentEdit) error {
}
//更新部门关系数据
err = departmentRelationUpdate(departUpdate, newparent)
if err != nil {
e := fmt.Errorf("departmentRelationUpdate err:%s", err)
log.Error(e.Error())
return err
if departUpdate.ParentId > 0 {
err = departmentRelationUpdate(departUpdate, newparent)
if err != nil {
e := fmt.Errorf("departmentRelationUpdate err:%s", err)
log.Error(e.Error())
return err
}
}
return nil
}
... ...