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