...
|
...
|
@@ -136,9 +136,9 @@ func departmentRelationUpdate(departmentUpdate models.Department, newparent mode |
|
|
)
|
|
|
if newparent.Id == 0 {
|
|
|
//修改节点为顶层节点的情况
|
|
|
newRelation = fmt.Sprintf("%d/", departmentUpdate.Id)
|
|
|
newRelation = fmt.Sprintf(",%d,", departmentUpdate.Id)
|
|
|
} else {
|
|
|
newRelation = fmt.Sprintf("%s%d/", newparent.Relation, departmentUpdate.Id)
|
|
|
newRelation = fmt.Sprintf("%s%d,", newparent.Relation, departmentUpdate.Id)
|
|
|
}
|
|
|
o := orm.NewOrm()
|
|
|
o.Begin()
|
...
|
...
|
|