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