u
This commit is contained in:
1 parent
d9c49b34db
commit
d33cef825a
36 files changed
+753
-1077
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"allapp/db"
|
||||
"allapp/logx"
|
||||
"context"
|
||||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
)
|
||||
|
||||
@@ -18,10 +19,12 @@ func RefreshActive() app.HandlerFunc {
|
||||
}
|
||||
|
||||
// 异步刷新活跃时间
|
||||
go func() {
|
||||
if err := db.Queries.UpdateUserActiveTime(c, userID); err != nil {
|
||||
logx.CtxError(c, "刷新用户活跃时间失败, userID=%d, err=%v", userID, err)
|
||||
go func(userID int64) {
|
||||
ctx := context.Background()
|
||||
|
||||
if err := db.Queries.UpdateUserLastLoginTime(ctx, userID); err != nil {
|
||||
logx.CtxError(ctx, "刷新用户活跃时间失败, userID=%d, err=%v", userID, err)
|
||||
}
|
||||
}()
|
||||
}(userID)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user