Add annotations and translate Chinese into English

This commit is contained in:
Liujian committed 2025-10-17 16:26:14 +08:00
1 parent 7c75c07216
commit f042cdf911
26 files changed
+342 -306

No files matched your search

@@ -30,34 +30,3 @@ async def stats(
)
except Exception as e:
return ResponseUtils.error(f"Failed to get stats analytics: {str(e)}", 500)
# @router.get("/platform")
# async def get_platform_overview(db: Session = Depends(get_db)):
# """Get platform overview statistics and metrics."""
# try:
# # Get total users (non-admin and not deleted)
# total_user = db.query(User).filter(User.role_id != 1, User.is_deleted == 0).count() # Non-admin (role_id 1 is admin), not deleted
# # Get total balance
# total_balance_result = db.query(func.sum(UserWallet.balance)).scalar()
# total_balance = int(total_balance_result) if total_balance_result else 0
# # Get total number of services
# total_service = db.query(McpService).count()
# # Get today's invocation count
# today = date.today()
# today_invoke_count = db.query(McpCallLog).filter(func.date(McpCallLog.created_at) == today).count()
# # Build response data
# response_data = {
# "total_user": total_user,
# "total_balance": total_balance,
# "total_service": total_service,
# "invoke_count": {"today": today_invoke_count},
# }
# return ResponseUtils.success(response_data)
# except Exception as e:
# return ResponseUtils.error(f"Failed to get platform overview: {str(e)}", 500)