|
|
|
@ -101,12 +101,16 @@ func UpdateBaseOrganization(model models.TBaseOrganization, ForceUpdateFields []
|
|
|
|
|
for i := range list {
|
|
|
|
|
u := new(models.TBaseOrganization)
|
|
|
|
|
u.SortId = model.SortId + int32(i+1)
|
|
|
|
|
id := list[i]["org_id"]
|
|
|
|
|
id := list[i]["org_id"].(string)
|
|
|
|
|
_, err := session.ID(id).Update(u)
|
|
|
|
|
if err != nil {
|
|
|
|
|
session.Rollback()
|
|
|
|
|
return 0, err
|
|
|
|
|
}
|
|
|
|
|
//删除缓存
|
|
|
|
|
var ids = []string{id}
|
|
|
|
|
var selector = SqlKit.GetBean("t_base_organization")
|
|
|
|
|
SqlKit.DeleteCacheByIds(ids, selector)
|
|
|
|
|
}
|
|
|
|
|
//事务提交
|
|
|
|
|
err := session.Commit()
|
|
|
|
|