feat(users): 更新用户最后登录时间记录功能
This commit is contained in:
@@ -108,6 +108,10 @@ export class UsersService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新用户最后登录时间
|
||||||
|
existingUser.lastLogin = new Date();
|
||||||
|
await existingUser.save();
|
||||||
|
|
||||||
const [profile] = await this.userProfileModel.findOrCreate({
|
const [profile] = await this.userProfileModel.findOrCreate({
|
||||||
where: { userId: existingUser.id },
|
where: { userId: existingUser.id },
|
||||||
defaults: { userId: existingUser.id },
|
defaults: { userId: existingUser.id },
|
||||||
|
|||||||
Reference in New Issue
Block a user