feat: AI虚拟用户新闻互动系统 v1.3.0 初始提交

- 虚拟用户管理(昵称/头像/性别/简介/邮箱同步到目标平台)
- AI互动调度(点赞/收藏/评论/转发)
- 日志时间改为北京时间
- 评论达上限后继续执行点赞收藏转发
- 一键登出全部功能
- 浅色主题UI
This commit is contained in:
stefanfeng
2026-03-31 10:20:57 +08:00
commit 0cfc9bf9c8
53 changed files with 8457 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
"""数据看板接口"""
from fastapi import APIRouter, Depends, Query
from app.core.database import get_db
from app.schemas import ApiResponse
from app.services.stats_service import stats_service
router = APIRouter()
@router.get("")
async def get_dashboard(db=Depends(get_db)):
data = await stats_service.get_dashboard(db)
return ApiResponse(data=data)
@router.get("/token-trend")
async def get_token_trend(days: int = Query(default=30, ge=7, le=90), db=Depends(get_db)):
trend = await stats_service.get_token_trend(db, days)
return ApiResponse(data=trend)
@router.get("/monthly-token-trend")
async def get_monthly_token_trend(db=Depends(get_db)):
trend = await stats_service.get_monthly_token_trend(db)
return ApiResponse(data=trend)