fix:提交修复6个问题
This commit is contained in:
@@ -217,8 +217,14 @@ export class AuthService {
|
||||
if (existing) throw new BadRequestException('该手机号已绑定门店');
|
||||
return;
|
||||
}
|
||||
if (scene === SmsScene.PARTNER_LOGIN || scene === SmsScene.PARTNER_STAFF_ADD) {
|
||||
if (scene === SmsScene.PARTNER_LOGIN) {
|
||||
await this.assertPartnerAccountByPhone(phone);
|
||||
return;
|
||||
}
|
||||
if (scene === SmsScene.PARTNER_STAFF_ADD) {
|
||||
const existing = await this.prisma.partnerAccount.findUnique({ where: { phone } });
|
||||
if (existing) throw new BadRequestException('该手机号已被使用');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,6 +608,7 @@ export class AuthService {
|
||||
name: account.name,
|
||||
phone: account.phone,
|
||||
isPrimary: account.isPrimary === 1,
|
||||
staffRole: account.staffRole ?? undefined,
|
||||
companyName: account.partner.companyName,
|
||||
});
|
||||
}
|
||||
@@ -1152,6 +1159,7 @@ export class AuthService {
|
||||
name: account.name,
|
||||
phone: account.phone,
|
||||
isPrimary: account.isPrimary === 1,
|
||||
staffRole: account.staffRole ?? undefined,
|
||||
companyName: account.partner.companyName,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user