作者 tangxvhui

数据同步 部门 bug 修复

... ... @@ -180,7 +180,7 @@ func departmentRelationUpdate(departmentUpdate models.Department, newparent mode
//修改部门及子级部门的relation
for i := range departmentSubset {
err = models.UpdateDepartmentById(departmentSubset[i], []string{"ParentId", "Relation"}, o)
err = models.UpdateDepartmentById(departmentSubset[i], []string{"ParentId", "Relation", "Level"}, o)
if err != nil {
log.Error("更新position发生错误,bussiness_admin_id=%d,id=%d,err:%s", departmentSubset[i].BusinessDepartmentId, departmentSubset[i].Id, err)
o.Rollback()
... ...
... ... @@ -158,7 +158,7 @@ func positionRelationUpdate(positionUpdate models.Position, newparent models.Pos
//修改部门及子级部门的relation
for i := range positionSubset {
err = models.UpdatePositionById(positionSubset[i], []string{"ParentId", "Relation"}, o)
err = models.UpdatePositionById(positionSubset[i], []string{"ParentId", "Relation", "Level"}, o)
if err != nil {
log.Error("更新position发生错误,bussiness_admin_id=%d,id=%d,err:%s", positionSubset[i].BusinessPositionId, positionSubset[i].Id, err)
o.Rollback()
... ...