แก้คิวรี่ 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.orgChild2", "orgChild2")
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3") .leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4") .leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
.andWhere(`profileTree.id IN (:...profiles)`, { .andWhere(requestBody.id == null ? "1=1" : `permissionOrg.orgRootId LIKE :rootId`, {
profiles: profiles == null || profiles.length == 0 ? ["null"] : profiles, rootId: requestBody.id,
}) })
.andWhere( .andWhere(
requestBody.searchKeyword != undefined && requestBody.searchKeyword != undefined &&
@ -388,8 +388,8 @@ export class PermissionOrgController extends Controller {
return { return {
id: _data.id, id: _data.id,
profileId: _data.profileTree.id, profileId: _data.profileId,
orgRootId: _data.orgRootTree.id, orgRootId: _data.orgRootId,
orgNew: _data.orgRootTree.orgRootName, orgNew: _data.orgRootTree.orgRootName,
avatar: _data.profileTree.avatar, avatar: _data.profileTree.avatar,
avatarName: _data.profileTree.avatarName, avatarName: _data.profileTree.avatarName,