mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-08 21:30:01 +08:00
🎨 webui群组代码优化 (#1683)
This commit is contained in:
@@ -136,8 +136,8 @@ async def _(bot_id: str | None = None) -> Result:
|
||||
async def _(bot_id: str | None = None) -> Result:
|
||||
now = datetime.now()
|
||||
query = Statistics
|
||||
# if bot_id:
|
||||
# query = query.filter(bot_id=bot_id)
|
||||
if bot_id:
|
||||
query = query.filter(bot_id=bot_id)
|
||||
all_count = await query.annotate().count()
|
||||
day_count = await query.filter(
|
||||
create_time__gte=now - timedelta(hours=now.hour, minutes=now.minute)
|
||||
|
||||
Reference in New Issue
Block a user