训练图片管理面板,右侧统计从前十限制改为全部,并且支持点击直接显示。

This commit is contained in:
2026-03-04 17:00:54 +08:00
parent 1ff540045d
commit b2a5060a19
4 changed files with 35 additions and 10 deletions
+1 -2
View File
@@ -270,7 +270,7 @@ class MySQLManager:
month_start = today_start.replace(day=1)
month_count = base_query.filter(Model.create_time >= month_start).count()
# TOP 10物品统计
# 全部物品统计(按数量降序)
from sqlalchemy import func
top_items = session.query(
Model.goods_name,
@@ -289,7 +289,6 @@ class MySQLManager:
top_items = top_items.group_by(Model.goods_name)\
.order_by(func.count(Model.id).desc())\
.limit(10)\
.all()
return {