This commit is contained in:
ditiqi 2025-02-06 19:23:11 +08:00
parent fed255d2c8
commit a3f3f54639
1 changed files with 13 additions and 0 deletions

View File

@ -187,6 +187,19 @@ export class PostService extends BaseTreeService<Prisma.PostDelegate> {
);
return transDto;
}
// async findMany(args: Prisma.PostFindManyArgs, staff?: UserProfile) {
// if (!args.where) args.where = {};
// args.where.OR = await this.preFilter(args.where.OR, staff);
// return this.wrapResult(super.findMany(args), async (result) => {
// await Promise.all(
// result.map(async (item) => {
// await setPostRelation({ data: item, staff });
// await this.setPerms(item, staff);
// }),
// );
// return { ...result };
// });
// }
async findManyWithCursor(args: Prisma.PostFindManyArgs, staff?: UserProfile) {
if (!args.where) args.where = {};
args.where.OR = await this.preFilter(args.where.OR, staff);