u
This commit is contained in:
1 parent
d6dd5b032d
commit
8a6d29f5d0
16 files changed
+514
-69
No files matched your search
@@ -4,8 +4,10 @@ import (
|
||||
"base-go-v2/internal/db"
|
||||
response "base-go-v2/internal/reponse"
|
||||
"base-go-v2/internal/router"
|
||||
"base-go-v2/internal/routinex"
|
||||
"base-go-v2/internal/utils/jwtx"
|
||||
"base-go-v2/internal/utils/mapx"
|
||||
"base-go-v2/internal/utils/timex"
|
||||
"base-go-v2/internal/utils/uid"
|
||||
)
|
||||
|
||||
@@ -102,10 +104,17 @@ func loginDefault(c *router.Context) error {
|
||||
"username", user.GetString("username"),
|
||||
"seqNo", user.GetInt("seq_no"),
|
||||
"gender", user.GetInt("gender"),
|
||||
"accessToken", accessToken,
|
||||
"token", accessToken,
|
||||
"refreshToken", refreshToken,
|
||||
)
|
||||
|
||||
routinex.Go(func() {
|
||||
kv := mapx.New().SetKV(
|
||||
"last_login_time", timex.NowString(),
|
||||
)
|
||||
_, _ = db.UpdateOne("user_info", "id", userId, kv)
|
||||
})
|
||||
|
||||
return response.Success(c).
|
||||
Data(respData).
|
||||
Send()
|
||||
|
||||
Reference in new issue
Block a user