添加 刷新通讯录功能,用于解决冗余数据问题。

This commit is contained in:
liuwei
2025-05-07 12:44:14 +08:00
parent ec1946697d
commit 2df93f29f5
2 changed files with 3 additions and 3 deletions

View File

@@ -627,11 +627,11 @@ class ContactsDBOperator(BaseDBOperator):
return None
#新增群信息删除功能
def delete_chatroom_info(self, chatroom_id: str) -> bool:
def delete_chatroom_all_info(self, chatroom_id: str) -> bool:
"""删除群成员信息"""
try:
sql = "DELETE FROM t_chatroom_member WHERE chatroom_id = %s"
self.execute_update(sql, (chatroom_id))
self.execute_update(sql, (chatroom_id,))
self.LOG.info(f"成功删除群{chatroom_id}信息")
sql = "DELETE FROM t_chatrooms WHERE chatroom_id = %s"
self.execute_update(sql, (chatroom_id,))

View File

@@ -569,7 +569,7 @@ class Robot(Job):
else:
self.LOG.error(f"获取群 {group_id} 信息失败,证明用户无该群信息,删除群的相关资料。")
# 删除群数据库中的群信息
self.contacts_db.delete_chatroom_info(group_id)
self.contacts_db.delete_chatroom_all_info(group_id)
self.LOG.info("联系人信息刷新完成")
# ============================================== 业务内容==========================================================