fix(sync): align customer backend behavior

This commit is contained in:
2026-06-11 11:41:24 +08:00
parent 60c8fc4948
commit d6dda51008
10 changed files with 34 additions and 47 deletions
-22
View File
@@ -1,5 +1,4 @@
from typing import Any
import random
from fastapi import APIRouter, Query
from fastapi.responses import JSONResponse
from fastapi import status
@@ -63,24 +62,3 @@ async def fastapi_test_dict(data: Item) -> dict[str, str]:
"""
item = data.dict()
return item
@router.get("/getrealtimedata/", summary="获取实时数据", description="获取实时监测数据")
async def fastapi_get_realtimedata():
"""
获取实时数据
返回随机生成的实时监测数据示例
"""
data = [random.randint(0, 100) for _ in range(100)]
return data
@router.get("/getsimulationresult/", summary="获取模拟结果", description="获取仿真计算结果")
async def fastapi_get_simulationresult():
"""
获取仿真结果
返回随机生成的仿真计算结果示例
"""
data = [random.randint(0, 100) for _ in range(100)]
return data
+6 -2
View File
@@ -6,6 +6,7 @@ from app.api.v1.endpoints import (
scada,
extension,
snapshots,
# data_query,
users,
schemes,
misc,
@@ -54,7 +55,9 @@ api_router = APIRouter()
# Core Services
api_router.include_router(auth.router, prefix="/auth", tags=["Auth"])
api_router.include_router(user_management.router, prefix="/users", tags=["User Management"]) # 新增
api_router.include_router(
user_management.router, prefix="/users", tags=["User Management"]
) # 新增
api_router.include_router(audit.router, prefix="/audit", tags=["Audit Logs"]) # 新增
api_router.include_router(meta.router, tags=["Metadata"])
api_router.include_router(project.router, tags=["Project"])
@@ -84,7 +87,8 @@ api_router.include_router(visuals.router, tags=["Visuals"])
# Simulation & Data
api_router.include_router(simulation.router, tags=["Simulation Control"])
api_router.include_router(scada.router, tags=["SCADA"])
# api_router.include_router(data_query.router, tags=["Data Query & InfluxDB"])
api_router.include_router(scada.router)
api_router.include_router(snapshots.router, tags=["Snapshots"])
api_router.include_router(users.router, tags=["Users"])
api_router.include_router(schemes.router, tags=["Schemes"])