update
This commit is contained in:
parent
52fb55fcd7
commit
0e702cce9a
2828
b/all_table.sql
Normal file
2828
b/all_table.sql
Normal file
File diff suppressed because it is too large
Load Diff
@ -376,7 +376,6 @@ async def model_usage_user_report(ns={}):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
return {'status': False, 'msg': '查询失败, %s' % str(e)}
|
return {'status': False, 'msg': '查询失败, %s' % str(e)}
|
||||||
|
|
||||||
|
|
||||||
async def model_usage_admin_report(ns={}):
|
async def model_usage_admin_report(ns={}):
|
||||||
"""
|
"""
|
||||||
管理员查看当前机构下所有客户的模型使用汇总。
|
管理员查看当前机构下所有客户的模型使用汇总。
|
||||||
|
|||||||
@ -316,8 +316,8 @@ async def model_usage_user_report(ns={}):
|
|||||||
if group_by and group_by not in ('hour', 'day', 'week'):
|
if group_by and group_by not in ('hour', 'day', 'week'):
|
||||||
return {'status': False, 'msg': 'group_by 仅支持 hour / day / week'}
|
return {'status': False, 'msg': 'group_by 仅支持 hour / day / week'}
|
||||||
|
|
||||||
page_size = int(ns.get('page_size', 20))
|
page_size = int(ns.get('page_size')) if ns.get('page_size') else 20
|
||||||
current_page = int(ns.get('current_page', 1))
|
current_page = int(ns.get('current_page')) if ns.get('current_page') else 1
|
||||||
offset = (current_page - 1) * page_size
|
offset = (current_page - 1) * page_size
|
||||||
|
|
||||||
db = DBPools()
|
db = DBPools()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user