feat(backend): 6-axis dynamic evaluation system with weight engine and template management
This commit is contained in:
+10
-1
@@ -56,13 +56,21 @@ from app.routers.knowledge import router as knowledge_router
|
||||
from app.routers.data_sources import router as data_sources_router
|
||||
from app.routers.industry_research import router as industry_research_router
|
||||
from app.routers.funds import router as funds_router
|
||||
from app.routers.evaluation import router as evaluation_router
|
||||
from app.schemas.common import error
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
"""应用生命周期管理。"""
|
||||
# startup
|
||||
# startup — 初始化预设评价模板
|
||||
from app.core.database import async_session_factory
|
||||
from app.services.evaluation_presets import seed_evaluation_templates
|
||||
|
||||
async with async_session_factory() as session:
|
||||
await seed_evaluation_templates(session)
|
||||
await session.commit()
|
||||
|
||||
yield
|
||||
# shutdown
|
||||
|
||||
@@ -160,3 +168,4 @@ app.include_router(knowledge_router, prefix="/api/v1")
|
||||
app.include_router(data_sources_router, prefix="/api/v1")
|
||||
app.include_router(industry_research_router, prefix="/api/v1")
|
||||
app.include_router(funds_router, prefix="/api/v1")
|
||||
app.include_router(evaluation_router, prefix="/api/v1")
|
||||
|
||||
Reference in New Issue
Block a user