From 75fbea2c907a074bdc6bb3210ec41a7b0a438b8d Mon Sep 17 00:00:00 2001 From: richarjiang Date: Thu, 20 Nov 2025 19:04:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(users):=20=E6=9B=B4=E6=96=B0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=9C=80=E5=90=8E=E7=99=BB=E5=BD=95=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/users/users.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/users/users.service.ts b/src/users/users.service.ts index d829c63..7cdb57d 100644 --- a/src/users/users.service.ts +++ b/src/users/users.service.ts @@ -108,6 +108,10 @@ export class UsersService { }; } + // 更新用户最后登录时间 + existingUser.lastLogin = new Date(); + await existingUser.save(); + const [profile] = await this.userProfileModel.findOrCreate({ where: { userId: existingUser.id }, defaults: { userId: existingUser.id },