作者 yangfu

修改部门列表

@@ -82,7 +82,7 @@ func GetUserDepartments(id int64, companyId int64, v interface{}) (err error) { @@ -82,7 +82,7 @@ func GetUserDepartments(id int64, companyId int64, v interface{}) (err error) {
82 select a.department_id,b.name,b.parent_id,b.managers,b.relation,b.create_at create_time 82 select a.department_id,b.name,b.parent_id,b.managers,b.relation,b.create_at create_time
83 from user_department a INNER JOIN department b on a.department_id = b.id 83 from user_department a INNER JOIN department b on a.department_id = b.id
84 where a.user_company_id =? and a.company_id =? and enable_status =1 and b.delete_at =0 84 where a.user_company_id =? and a.company_id =? and enable_status =1 and b.delete_at =0
85 -order by b.parent_id,b.id 85 +order by b.level,b.id
86 ` 86 `
87 if _, err = o.Raw(sql, id, companyId).QueryRows(v); err == nil { 87 if _, err = o.Raw(sql, id, companyId).QueryRows(v); err == nil {
88 return 88 return