feat: search dept

This commit is contained in:
louis 2024-04-16 13:02:41 +08:00
parent aaba8dc173
commit 8ad1a48c60
2 changed files with 4 additions and 1 deletions

View File

@ -28,16 +28,18 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
# see https://pnpm.io/docker # see https://pnpm.io/docker
FROM base AS prod-deps 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 RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
FROM base AS build 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 --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build RUN pnpm run build
# mirror acceleration # mirror acceleration
# RUN npm config set registry https://registry.npmmirror.com # 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 # RUN npm config rm proxy && npm config rm https-proxy
FROM base FROM base

View File

@ -71,6 +71,7 @@ export class UserService {
const user: UserEntity = await this.userRepository const user: UserEntity = await this.userRepository
.createQueryBuilder('user') .createQueryBuilder('user')
.leftJoinAndSelect('user.roles', 'role') .leftJoinAndSelect('user.roles', 'role')
.leftJoinAndSelect('user.dept', 'dept')
.where(`user.id = :uid`, { uid }) .where(`user.id = :uid`, { uid })
.getOne(); .getOne();