正在显示
2 个修改的文件
包含
2 行增加
和
2 行删除
@@ -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() |
-
请 注册 或 登录 后发表评论