main #115

Merged
charles merged 10 commits from main into prod 2026-05-29 18:15:12 +08:00
3 changed files with 2830 additions and 3 deletions
Showing only changes of commit 0e702cce9a - Show all commits

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()