From 5d6e786c02631a2c450b1fbc3d565ce84230d3fb Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Mon, 17 Mar 2025 14:34:23 +0800 Subject: [PATCH] token expire --- server/service/staff_user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/service/staff_user.go b/server/service/staff_user.go index ae286ea..8c3d682 100644 --- a/server/service/staff_user.go +++ b/server/service/staff_user.go @@ -40,7 +40,7 @@ func (s *StaffUser) Login(sess *session.AdminSession, req *api.StaffLoginReq) in token := new(model.StaffToken) token.UserId = user.Id - token.ExpireTime = time.Now().Unix() + 86400 + token.ExpireTime = time.Now().Unix() + 86400*30 token.Token = uuid.New().String() _, err = dao.NewStaffTokenDao().Create(token) session.CheckDBError(err)