แก้คิวรี่ list คน

This commit is contained in:
kittapath 2024-09-06 16:05:29 +07:00
parent 3a09badfe6
commit b544380018

View file

@ -279,8 +279,8 @@ export class PermissionOrgController extends Controller {
.leftJoinAndSelect("current_holders.orgChild2", "orgChild2")
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
.andWhere(`profileTree.id IN (:...profiles)`, {
profiles: profiles == null || profiles.length == 0 ? ["null"] : profiles,
.andWhere(requestBody.id == null ? "1=1" : `permissionOrg.orgRootId LIKE :rootId`, {
rootId: requestBody.id,
})
.andWhere(
requestBody.searchKeyword != undefined &&
@ -388,8 +388,8 @@ export class PermissionOrgController extends Controller {
return {
id: _data.id,
profileId: _data.profileTree.id,
orgRootId: _data.orgRootTree.id,
profileId: _data.profileId,
orgRootId: _data.orgRootId,
orgNew: _data.orgRootTree.orgRootName,
avatar: _data.profileTree.avatar,
avatarName: _data.profileTree.avatarName,