v0.2.0: CRM/ERP 系统升级 - 清理 .gitignore 并移除误提交的 venv/env/db 文件
- 更新 .gitignore:全面覆盖环境变量、数据库、日志、缓存、上传文件 - 移除误跟踪的 server/venv/、crm_data.db、.env 文件 - 新增 server/.env.example 模板 - 新增合同管理、利润核算、AI教练等功能模块 - 新增 Playwright e2e 测试套件 - 前后端多项功能升级和 bug 修复
This commit is contained in:
@@ -26,6 +26,10 @@ from app.api.sales_invoice import router as sales_invoice_router
|
||||
from app.api.reports import router as reports_router
|
||||
from app.api.contacts import router as contacts_router
|
||||
from app.api.dashboard import router as dashboard_router
|
||||
from app.api.companies import router as companies_router
|
||||
from app.api.contracts import router as contracts_router
|
||||
from app.api.profit import router as profit_router
|
||||
from app.api.ai_coaching import router as ai_coaching_router
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
@@ -33,8 +37,11 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]:
|
||||
"""应用生命周期:启动/关闭时的钩子"""
|
||||
# ── startup ──
|
||||
print(f"🚀 {settings.APP_NAME} v{settings.APP_VERSION} 启动中...")
|
||||
from app.services.ocr_worker import ocr_worker
|
||||
ocr_worker.start()
|
||||
yield
|
||||
# ── shutdown ──
|
||||
await ocr_worker.stop()
|
||||
print("👋 服务正在关闭...")
|
||||
|
||||
|
||||
@@ -81,6 +88,10 @@ app.include_router(sales_invoice_router, prefix="/api")
|
||||
app.include_router(reports_router, prefix="/api")
|
||||
app.include_router(contacts_router, prefix="/api")
|
||||
app.include_router(dashboard_router, prefix="/api")
|
||||
app.include_router(companies_router, prefix="/api")
|
||||
app.include_router(contracts_router, prefix="/api")
|
||||
app.include_router(profit_router, prefix="/api")
|
||||
app.include_router(ai_coaching_router, prefix="/api")
|
||||
|
||||
|
||||
# ── 健康检查 ──
|
||||
|
||||
Reference in New Issue
Block a user