diff --git a/backend/services/identity-service/src/application/services/user-application.service.ts b/backend/services/identity-service/src/application/services/user-application.service.ts index dd2ee596..c15e4c4d 100644 --- a/backend/services/identity-service/src/application/services/user-application.service.ts +++ b/backend/services/identity-service/src/application/services/user-application.service.ts @@ -2971,11 +2971,11 @@ export class UserApplicationService { const user = await this.prisma.userAccount.findUnique({ where: { userId: BigInt(userId) }, - select: { phoneNumber: true, isActive: true }, + select: { phoneNumber: true, status: true }, }); if (!user) throw new ApplicationError('用户不存在'); - if (!user.isActive) throw new ApplicationError('账户已冻结或注销'); + if (user.status !== 'ACTIVE') throw new ApplicationError('账户已冻结或注销'); if (!user.phoneNumber) throw new ApplicationError('账户未绑定手机号'); const code = this.generateSmsCode(); @@ -3008,11 +3008,11 @@ export class UserApplicationService { const user = await this.prisma.userAccount.findUnique({ where: { userId: BigInt(userId) }, - select: { phoneNumber: true, isActive: true }, + select: { phoneNumber: true, status: true }, }); if (!user) throw new ApplicationError('用户不存在'); - if (!user.isActive) throw new ApplicationError('账户已冻结或注销'); + if (user.status !== 'ACTIVE') throw new ApplicationError('账户已冻结或注销'); if (!user.phoneNumber) throw new ApplicationError('账户未绑定手机号'); // 1. 验证短信验证码