修改保存用户信息
This commit is contained in:
@@ -84,11 +84,6 @@ class XiuxianRedisDB:
|
||||
group_id = player.get("group_id", "")
|
||||
new_key = f"{self.player_prefix}{group_id}:{user_id}"
|
||||
old_key = f"{self.player_prefix}{user_id}"
|
||||
|
||||
# 更新数据库
|
||||
if self.db_manager.mysql_pool:
|
||||
self.xdb.update_player_fields(user_id, group_id, player)
|
||||
|
||||
# 保存到新格式
|
||||
r.set(new_key, json.dumps(player, ensure_ascii=False))
|
||||
# 删除旧格式(如果存在),确保数据一致性
|
||||
|
||||
Reference in New Issue
Block a user