作者 yangfu

Merge remote-tracking branch 'origin/master' into test

... ... @@ -89,7 +89,7 @@ spec:
- name: RUN_MODE
value: "prod"
- name: LOG_LEVEL
value: "error"
value: "debug"
- name: aliyun_logs_suplusfile
value: "stdout"
- name: aliyun_logs_access
... ...
... ... @@ -84,7 +84,7 @@ func GetDepartmentByCompanyId(companyId int64) (v []*Department, err error) {
select *
from department
where company_id =? and delete_at =0
order by parent_id,id`
order by level,id`
if _, err = o.Raw(sql, companyId).QueryRows(&v); err == nil {
return
}
... ... @@ -107,7 +107,7 @@ func GetDepartmentIdsByCompanyId(companyId int) (v []int64, err error) {
select id
from department
where company_id =? and delete_at =0
order by parent_id,id`
order by level,id`
if _, err = o.Raw(sql, companyId).QueryRows(&v); err == nil {
return
}
... ... @@ -122,7 +122,7 @@ select id from (
select department_id from user_department where user_company_id=? and enable_status = 1
)a inner join department b on a.department_id = b.id
where b.delete_at =0
order by parent_id,id`
order by b.level,b.id`
if _, err = o.Raw(sql, uid).QueryRows(&v); err == nil {
if err == orm.ErrNoRows {
err = nil
... ...