This commit is contained in:
aozhiwei 2020-10-30 14:57:14 +08:00
parent 69df47f48e
commit 3a39acfd9b

View File

@ -39,12 +39,12 @@ func IsValidSessionId(accountId string, sessionId string, key string) bool {
return q5.Md5Str(accountId + key + registerTime + sessionCreateTime) == md5Str return q5.Md5Str(accountId + key + registerTime + sessionCreateTime) == md5Str
} }
func ExtractRegisterTimeFromSessionId(sessionId string) int32 { func ExtractRegisterTimeFromSessionId(sessionId string) int64 {
tmpStrings := strings.Split(sessionId, "_") tmpStrings := strings.Split(sessionId, "_")
if len(tmpStrings) < 4 { if len(tmpStrings) < 4 {
return 0 return 0
} }
return new(q5.XValue).SetString(tmpStrings[1]).GetInt32() return new(q5.XValue).SetString(tmpStrings[1]).GetInt64()
} }
func ExtractGameIdFromAccountId(accountId string) int32 { func ExtractGameIdFromAccountId(accountId string) int32 {