作者 tangxvhui

数据同步 部门 bug 修复

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