mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 16:02:26 +08:00
id写错了
This commit is contained in:
@@ -8,9 +8,9 @@ const RedisPlayerKeyPrefix = "HK4E"
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
AccountIdRedisKey = "AccountId"
|
AccountIdRedisKey = "AccountId"
|
||||||
AccountIdBegin uint64 = 1
|
AccountIdBegin uint64 = 10000
|
||||||
YuanShenUidRedisKey = "YuanShenUid"
|
YuanShenUidRedisKey = "YuanShenUid"
|
||||||
YuanShenUidBegin uint64 = 100000001
|
YuanShenUidBegin uint64 = 100000000
|
||||||
)
|
)
|
||||||
|
|
||||||
func (d *Dao) GetNextAccountId() (uint64, error) {
|
func (d *Dao) GetNextAccountId() (uint64, error) {
|
||||||
@@ -28,9 +28,9 @@ func (d *Dao) redisInc(keyName string) (uint64, error) {
|
|||||||
}
|
}
|
||||||
if exist == 0 {
|
if exist == 0 {
|
||||||
var value uint64 = 0
|
var value uint64 = 0
|
||||||
if keyName == AccountIdRedisKey {
|
if keyName == RedisPlayerKeyPrefix+":"+AccountIdRedisKey {
|
||||||
value = AccountIdBegin
|
value = AccountIdBegin
|
||||||
} else if keyName == YuanShenUidRedisKey {
|
} else if keyName == RedisPlayerKeyPrefix+":"+YuanShenUidRedisKey {
|
||||||
value = YuanShenUidBegin
|
value = YuanShenUidBegin
|
||||||
}
|
}
|
||||||
err := d.redis.Set(context.TODO(), keyName, value, 0).Err()
|
err := d.redis.Set(context.TODO(), keyName, value, 0).Err()
|
||||||
|
|||||||
Reference in New Issue
Block a user