|
@@ -42,11 +42,13 @@ func (*deviceService) SignIn(ctx context.Context, userId, deviceId int64, token |
|
|
cacheKey := fmt.Sprintf(SignInKey, masterId, utils.Int64ToStr(userId)) |
|
|
cacheKey := fmt.Sprintf(SignInKey, masterId, utils.Int64ToStr(userId)) |
|
|
if db.RedisUtil.Exists(cacheKey) { |
|
|
if db.RedisUtil.Exists(cacheKey) { |
|
|
utils.FilePutContents("sign_in", utils.SerializeStr(map[string]interface{}{ |
|
|
utils.FilePutContents("sign_in", utils.SerializeStr(map[string]interface{}{ |
|
|
|
|
|
"master_id": masterId, |
|
|
"user_id": userId, |
|
|
"user_id": userId, |
|
|
"device_id": deviceId, |
|
|
"device_id": deviceId, |
|
|
"token": token, |
|
|
"token": token, |
|
|
"conn_addr": connAddr, |
|
|
"conn_addr": connAddr, |
|
|
"client_addr": clientAddr, |
|
|
"client_addr": clientAddr, |
|
|
|
|
|
"cache_key": cacheKey, |
|
|
})) |
|
|
})) |
|
|
return errors.New("限频!!!") |
|
|
return errors.New("限频!!!") |
|
|
} else { |
|
|
} else { |
|
|