From f7ef3a91fc2a6dbbf78a42f983d805cffb5151ad Mon Sep 17 00:00:00 2001 From: cool Date: Thu, 1 Feb 2024 15:28:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4groupBy=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/base/service/sys/menu.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/base/service/sys/menu.ts b/src/modules/base/service/sys/menu.ts index c1d1d36..3d60d4a 100644 --- a/src/modules/base/service/sys/menu.ts +++ b/src/modules/base/service/sys/menu.ts @@ -122,8 +122,8 @@ export class BaseSysMenuService extends BaseService { ); } find.orderBy('a.orderNum', 'ASC'); - find.groupBy('a.id'); - return await find.getMany(); + const list = await find.getMany(); + return _.uniqBy(list, 'id'); } /**