From 28a52b3803e576ae6874d3822640b08ef964243c Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 11 Jun 2025 16:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=A7=AF=E5=88=86=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/points_db.py | 1 + plugins/point_trade/main.py | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/points_db.py b/db/points_db.py index 1ed9385..f4ec22b 100644 --- a/db/points_db.py +++ b/db/points_db.py @@ -410,6 +410,7 @@ class PointsDBOperator(BaseDBOperator): SELECT user_id, total_points, checkin_points, game_points, other_points FROM t_user_points WHERE group_id = %s + AND user_id !='SYSTEM' ORDER BY total_points DESC LIMIT %s """, (group_id, limit)) diff --git a/plugins/point_trade/main.py b/plugins/point_trade/main.py index 36b6e7f..e7858f4 100644 --- a/plugins/point_trade/main.py +++ b/plugins/point_trade/main.py @@ -325,7 +325,7 @@ class PointTradePlugin(MessagePluginInterface): output = ( f"💰 {user_name} 的积分\n" f"━━━━━━━━━━━━━━\n" - f"💵 当前积分: {user_points.get('total_points', 0)}\n" + f"💵 当前积分: {user_points.get('total_points', 0)}" # f"📊 积分来源: {source_text}" f"{recent_txs}" ) @@ -372,12 +372,11 @@ class PointTradePlugin(MessagePluginInterface): points = user.get('total_points', 0) # 获取用户昵称 - user_info = self._get_user_record(user_id, roomid) - user_name = user_info.get('wx_nick_name', user_id) if user_info else user_id + user_info = self.bot.get_chatroom_nickname(user_id, roomid) # 添加排名标记 rank_mark = "🥇" if i == 1 else "🥈" if i == 2 else "🥉" if i == 3 else f"{i}." - rank_list.append(f"{rank_mark} {user_name}: {points} 积分") + rank_list.append(f"{rank_mark} {user_info}: {points} 积分") output = ( f"🏆 积分排行榜 🏆\n"