hsun 1 year ago
parent
commit
5399008ed7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      controllers/sys_admin.go

+ 2 - 1
controllers/sys_admin.go

@@ -1236,7 +1236,8 @@ func (this *SysAdminController) ResetPass() {
 	adminInfo.Password = pwd
 	adminInfo.LastUpdatedPasswordTime = time.Now().Format(utils.FormatDateTime)
 	adminInfo.LastUpdatedTime = time.Now().Format(utils.FormatDateTime)
-	if e := adminInfo.Update([]string{"Password", "LastUpdatedPasswordTime", "LastUpdatedTime"}); e != nil {
+	adminInfo.LastLoginTime = time.Now().Format(utils.FormatDateTime)
+	if e := adminInfo.Update([]string{"Password", "LastUpdatedPasswordTime", "LastUpdatedTime", "LastLoginTime"}); e != nil {
 		br.Msg = "操作失败"
 		br.ErrMsg = "更新系统用户分组失败, Err: " + e.Error()
 		return