去除groupBy,优化查询

This commit is contained in:
cool 2024-02-01 15:28:25 +08:00
parent ac0b0f2740
commit f7ef3a91fc

View File

@ -122,8 +122,8 @@ export class BaseSysMenuService extends BaseService {
); );
} }
find.orderBy('a.orderNum', 'ASC'); find.orderBy('a.orderNum', 'ASC');
find.groupBy('a.id'); const list = await find.getMany();
return await find.getMany(); return _.uniqBy(list, 'id');
} }
/** /**