fix;提交代码子账号
This commit is contained in:
@@ -78,6 +78,9 @@ export class AdminPartnersService {
|
||||
if (query.phone) where.phone = { contains: query.phone };
|
||||
if (query.partnerId) where.partnerId = BigInt(query.partnerId);
|
||||
if (query.status) where.status = query.status as Prisma.EnumAccountStatusFilter['equals'];
|
||||
if (query.isPrimary === '0' || query.isPrimary === '1') {
|
||||
where.isPrimary = Number(query.isPrimary);
|
||||
}
|
||||
|
||||
const [items, total] = await Promise.all([
|
||||
this.prisma.partnerAccount.findMany({
|
||||
@@ -87,6 +90,7 @@ export class AdminPartnersService {
|
||||
take: pageSize,
|
||||
include: {
|
||||
partner: { select: { id: true, companyName: true } },
|
||||
parent: { select: { id: true, name: true, phone: true } },
|
||||
},
|
||||
}),
|
||||
this.prisma.partnerAccount.count({ where }),
|
||||
@@ -97,7 +101,10 @@ export class AdminPartnersService {
|
||||
async detailPartnerAccount(id: bigint) {
|
||||
const account = await this.prisma.partnerAccount.findUnique({
|
||||
where: { id },
|
||||
include: { partner: true },
|
||||
include: {
|
||||
partner: true,
|
||||
parent: { select: { id: true, name: true, phone: true } },
|
||||
},
|
||||
});
|
||||
if (!account) throw new NotFoundException('开城合伙人账号不存在');
|
||||
|
||||
|
||||
@@ -123,6 +123,10 @@ export class AdminPartnerAccountsQueryDto extends PaginationQueryDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
status?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
isPrimary?: string;
|
||||
}
|
||||
|
||||
export class AdminBenefitCouponsQueryDto extends PaginationQueryDto {
|
||||
|
||||
Reference in New Issue
Block a user