This commit is contained in:
孟帅
2023-05-10 23:54:50 +08:00
parent bbe655a4d8
commit 49a96750bf
314 changed files with 15138 additions and 6244 deletions

View File

@@ -66,7 +66,7 @@ func (s *sHook) lastAdminActive(r *ghttp.Request) {
}
var (
ctx = r.Context()
ctx = contexts.Detach(r.Context())
member = contexts.GetUser(ctx)
)
@@ -76,7 +76,8 @@ func (s *sHook) lastAdminActive(r *ghttp.Request) {
if allow(member.Id) {
simple.SafeGo(ctx, func(ctx context.Context) {
_, err := g.Model("admin_member").Ctx(ctx).
_, err := g.Model("admin_member").
Ctx(ctx).
Where("id", member.Id).
WhereLT("last_active_at", gtime.Now()).
Data(g.Map{"last_active_at": gtime.Now()}).