@@ -338,22 +338,6 @@ class MessageStorageDB(BaseDBOperator):
|
||||
print(f"更新消息图片文件路径出错: {e}")
|
||||
return False
|
||||
|
||||
def get_pending_emoji_messages(self, minutes_ago: int = 1440, limit: int = 50) -> List[Dict]:
|
||||
"""获取最近N分钟内未处理表情的消息"""
|
||||
sql = """
|
||||
SELECT message_id, group_id, sender, message_xml, timestamp, attachment_url, message_type
|
||||
FROM messages
|
||||
WHERE message_type IN ('47', '1090519089')
|
||||
AND image_path IS NULL
|
||||
AND timestamp >= DATE_SUB(NOW(), INTERVAL %s MINUTE)
|
||||
AND attachment_url IS NOT NULL
|
||||
AND attachment_url != ''
|
||||
ORDER BY timestamp ASC
|
||||
LIMIT %s
|
||||
"""
|
||||
params = (minutes_ago, limit)
|
||||
return self.execute_query(sql, params) or []
|
||||
|
||||
|
||||
def get_hourly_message_trend(self, group_id: str = None, days: int = 1) -> List[Dict]:
|
||||
"""获取指定群组的按小时消息趋势数据
|
||||
|
||||
Reference in New Issue
Block a user