Skip to content

Commit

Permalink
更新查询条件,加入房间ID匹配,优化话题热度获取。
Browse files Browse the repository at this point in the history
  • Loading branch information
rippergs committed Dec 4, 2024
1 parent b38a2f7 commit b2dfdc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dao/topic_heat_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def get_heat_notify_list(room_wxid: str) -> List[TopicNotifyResult]:
th.heat,
th.created_at
FROM topic_heats th
INNER JOIN topic_keywords tk ON th.keyword = tk.keyword
INNER JOIN topic_keywords tk ON th.keyword = tk.keyword AND th.room_wxid = tk.room_wxid
WHERE tk.status = 1
AND th.heat > 0
AND th.room_wxid = :room_wxid
Expand All @@ -124,5 +124,5 @@ def get_heat_notify_list(room_wxid: str) -> List[TopicNotifyResult]:

if __name__ == '__main__':
model = TopicHeatDao()
for item in model.get_heat_diffs('52964830236@chatroom', '无声秘恋'):
for item in model.get_heat_notify_list('52964830236@chatroom'):
print(item)

0 comments on commit b2dfdc2

Please sign in to comment.