From 3aa285677043cf86d309627c354a947abf8b18dc Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 5 Mar 2026 07:05:42 -0800 Subject: [PATCH] =?UTF-8?q?fix(payment-password):=20=E4=BF=AE=E5=A4=8D=20i?= =?UTF-8?q?sActive=20=E5=AD=97=E6=AE=B5=E5=90=8D=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=88=E5=BA=94=E4=B8=BA=20status=20!=3D=3D=20ACTIVE?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prisma schema 中 UserAccount 无 isActive 字段,实际为 status VARCHAR(20)。 两处 select 改为 { phoneNumber, status },检查改为 status !== 'ACTIVE'。 Co-Authored-By: Claude Sonnet 4.6 --- .../src/application/services/user-application.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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. 验证短信验证码