From 78bb9be6af4c9e41aca42f4ce3b75e758d96c19a Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 20 Feb 2025 09:37:29 +0800 Subject: [PATCH] =?UTF-8?q?fixbug:=E4=BF=AE=E5=A4=8D=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=BE=A4=E9=87=8C=E9=9D=A2=E6=9C=89=E4=BA=BA?= =?UTF-8?q?=E9=80=80=E5=87=BA=EF=BC=8C=E5=8F=82=E4=B8=8E=E6=8E=92=E8=A1=8C?= =?UTF-8?q?=E7=9A=84=E4=BA=BA=E4=BC=9A=E5=87=BA=E6=95=85=E9=9A=9C=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=8F=91=E9=80=81=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- message_report/write_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/message_report/write_db.py b/message_report/write_db.py index 4d77c21..8e2c923 100644 --- a/message_report/write_db.py +++ b/message_report/write_db.py @@ -69,7 +69,7 @@ def generate_and_send_ranking(groupId, allContacts: dict): # 格式化输出字符串 ranking_str = yesterday + "发言数量前20的用户排名:\n" for rank, (username, speech_count) in enumerate(results, start=1): - ranking_str += f"{rank}. {allContacts[username]}: {speech_count} 次发言\n" + ranking_str += f"{rank}. {allContacts.get(username, username)}: {speech_count} 次发言\n" # 关闭数据库连接 connection.close() print(ranking_str)