クエリログに追跡用のIDをコメントとして追加
This commit is contained in:
parent
c246586498
commit
d92cb1d28b
@ -540,6 +540,7 @@ export class UsersService {
|
||||
// DBから同一アカウントのユーザ一覧を取得する
|
||||
const dbUsers = await this.usersRepository.findSameAccountUsers(
|
||||
externalId,
|
||||
context,
|
||||
);
|
||||
|
||||
// DBから取得したユーザーの外部IDをもとにADB2Cからユーザーを取得する
|
||||
|
||||
@ -35,6 +35,7 @@ import {
|
||||
import { Account } from '../accounts/entity/account.entity';
|
||||
import { Workflow } from '../workflows/entity/workflow.entity';
|
||||
import { Worktype } from '../worktypes/entity/worktype.entity';
|
||||
import { Context } from '../../common/log';
|
||||
|
||||
@Injectable()
|
||||
export class UsersRepositoryService {
|
||||
@ -340,7 +341,10 @@ export class UsersRepositoryService {
|
||||
* @param externalId
|
||||
* @returns User[]
|
||||
*/
|
||||
async findSameAccountUsers(external_id: string): Promise<User[]> {
|
||||
async findSameAccountUsers(
|
||||
external_id: string,
|
||||
context: Context,
|
||||
): Promise<User[]> {
|
||||
return await this.dataSource.transaction(async (entityManager) => {
|
||||
const repo = entityManager.getRepository(User);
|
||||
|
||||
@ -359,6 +363,7 @@ export class UsersRepositoryService {
|
||||
license: true,
|
||||
},
|
||||
where: { account_id: accountId },
|
||||
comment: `${context.getTrackingId()}`,
|
||||
});
|
||||
|
||||
return dbUsers;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user