From 8ad1a48c60dd1bc59dd5cb20a0e41b395305b9d6 Mon Sep 17 00:00:00 2001 From: louis <869322496@qq.com> Date: Tue, 16 Apr 2024 13:02:41 +0800 Subject: [PATCH] feat: search dept --- Dockerfile | 4 +++- src/modules/user/user.service.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f4acb8d..fa2b9dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,16 +28,18 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ # see https://pnpm.io/docker FROM base AS prod-deps +RUN pnpm config set registry https://registry.npmmirror.com RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile FROM base AS build +RUN pnpm config set registry https://registry.npmmirror.com RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN pnpm run build # mirror acceleration # RUN npm config set registry https://registry.npmmirror.com -# RUN pnpm config set registry https://registry.npmmirror.com + # RUN npm config rm proxy && npm config rm https-proxy FROM base diff --git a/src/modules/user/user.service.ts b/src/modules/user/user.service.ts index d3f7287..16842a7 100644 --- a/src/modules/user/user.service.ts +++ b/src/modules/user/user.service.ts @@ -71,6 +71,7 @@ export class UserService { const user: UserEntity = await this.userRepository .createQueryBuilder('user') .leftJoinAndSelect('user.roles', 'role') + .leftJoinAndSelect('user.dept', 'dept') .where(`user.id = :uid`, { uid }) .getOne();