feat: new function for add user in manger console user list page

This commit is contained in:
RockYang
2023-08-01 16:02:49 +08:00
parent ffb1ef0470
commit 9eb8da2789
5 changed files with 105 additions and 33 deletions

View File

@@ -146,6 +146,11 @@ func (h *UserHandler) Login(c *gin.Context) {
return
}
if user.Status == false {
resp.ERROR(c, "该用户已被禁止登录,请联系管理员")
return
}
// 更新最后登录时间和IP
user.LastLoginIp = c.ClientIP()
user.LastLoginAt = time.Now().Unix()