From 6854cfbaec9f70be96e4aed5f8d6954ecca095d0 Mon Sep 17 00:00:00 2001 From: falcon <9504402@qq.com> Date: Mon, 13 Apr 2020 08:49:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E3=80=81=E7=99=BB=E5=87=BA=E3=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=92=8C=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=9A=84=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FAuth/Controllers/api/UserController.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FAuth/Controllers/api/UserController.cs b/FAuth/Controllers/api/UserController.cs index fab855f..25b95b9 100644 --- a/FAuth/Controllers/api/UserController.cs +++ b/FAuth/Controllers/api/UserController.cs @@ -58,6 +58,7 @@ namespace FAuth.Controllers.api fir.LastLoginDatetime = now; fir.Status |= FUserStatusEnum.Login; this.Db.SaveChangesAsync().Wait(); + this.Logger.LogInformation($"用户{userName}登录成功!"); return new CheckUserResult { Ticket = this.UserTicketDryptor.Encrypt(new UserTicketModel { Id = fir.Id, @@ -85,6 +86,7 @@ namespace FAuth.Controllers.api fir.Status &= ~FUserStatusEnum.Login; fir.LastLogoutDatetime = DateTimeOffset.Now; this.Db.SaveChangesAsync().Wait(); + this.Logger.LogInformation($"用户{userTicketModel.Id}:{userTicketModel.UserName}登出成功!"); return true; } @@ -135,6 +137,7 @@ namespace FAuth.Controllers.api item.Password = nPassword; } this.Db.SaveChangesAsync().Wait(); + this.Logger.LogInformation($"用户{userTicketModel.Id}:{userTicketModel.UserName}修改密码成功!"); return true; } @@ -167,6 +170,7 @@ namespace FAuth.Controllers.api }; this.Db.Entry(nUser).State = EntityState.Added; this.Db.SaveChangesAsync().Wait(); + this.Logger.LogInformation($"用户{nUser.Id}:{nUser.UserName}:{nUser.Name}添加成功!"); return true; } }