From ec806a58c7dd9e61a76ac7a08becc4d885c61c1e Mon Sep 17 00:00:00 2001 From: flswld Date: Fri, 3 Feb 2023 23:00:13 +0800 Subject: [PATCH] =?UTF-8?q?id=E5=86=99=E9=94=99=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dispatch/dao/account_redis.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dispatch/dao/account_redis.go b/dispatch/dao/account_redis.go index 00e780af..eac39317 100644 --- a/dispatch/dao/account_redis.go +++ b/dispatch/dao/account_redis.go @@ -8,9 +8,9 @@ const RedisPlayerKeyPrefix = "HK4E" const ( AccountIdRedisKey = "AccountId" - AccountIdBegin uint64 = 1 + AccountIdBegin uint64 = 10000 YuanShenUidRedisKey = "YuanShenUid" - YuanShenUidBegin uint64 = 100000001 + YuanShenUidBegin uint64 = 100000000 ) func (d *Dao) GetNextAccountId() (uint64, error) { @@ -28,9 +28,9 @@ func (d *Dao) redisInc(keyName string) (uint64, error) { } if exist == 0 { var value uint64 = 0 - if keyName == AccountIdRedisKey { + if keyName == RedisPlayerKeyPrefix+":"+AccountIdRedisKey { value = AccountIdBegin - } else if keyName == YuanShenUidRedisKey { + } else if keyName == RedisPlayerKeyPrefix+":"+YuanShenUidRedisKey { value = YuanShenUidBegin } err := d.redis.Set(context.TODO(), keyName, value, 0).Err()