This commit is contained in:
ping 2026-05-28 15:58:12 +08:00
parent 52fb55fcd7
commit 0e702cce9a
3 changed files with 2830 additions and 3 deletions

2828
b/all_table.sql Normal file

File diff suppressed because it is too large Load Diff

View File

@ -376,7 +376,6 @@ async def model_usage_user_report(ns={}):
except Exception as e:
return {'status': False, 'msg': '查询失败, %s' % str(e)}
async def model_usage_admin_report(ns={}):
"""
管理员查看当前机构下所有客户的模型使用汇总。

View File

@ -316,8 +316,8 @@ async def model_usage_user_report(ns={}):
if group_by and group_by not in ('hour', 'day', 'week'):
return {'status': False, 'msg': 'group_by 仅支持 hour / day / week'}
page_size = int(ns.get('page_size', 20))
current_page = int(ns.get('current_page', 1))
page_size = int(ns.get('page_size')) if ns.get('page_size') else 20
current_page = int(ns.get('current_page')) if ns.get('current_page') else 1
offset = (current_page - 1) * page_size
db = DBPools()