作者 tangxvhui

调整AllParentUser sql

... ... @@ -70,7 +70,7 @@ recursive t_user as (
)
union
(
select "child_user".id,"child_user".parent_id,"child_user".account,"child_user".name,
select "parent_user".id,"parent_user".parent_id,"parent_user".account,"parent_user".name,
"child_user"."level" + 1 as "level"
from "user" as "parent_user"
join t_user as "child_user" on "parent_user".id="child_user".parent_id
... ... @@ -80,5 +80,5 @@ recursive t_user as (
result := []UserData1{}
tx := d.transactionContext.PgTx
_, err := tx.Query(&result, sqlStr, userId)
return nil, err
return result, err
}
... ...