feat: virtual company module, team projects, PWA dishes app, and startup scripts overhaul
- Add company module (3-tier org, CEO planning, parallel departments) - Add company orchestrator, knowledge extractor, presets, scheduler - Add company API endpoints, models, and frontend views - Add 今天吃啥 PWA app (69 dishes, real images, offline support) - Add team_projects output directory structure - Add unified manage.ps1 for service lifecycle - Add Windows startup guide v1.0 - Add TTS troubleshooting doc - Update frontend (AgentChat UX overhaul, new views) - Update backend (voice engine fix, multi-tenant, RBAC) - Remove deprecated startup scripts and old docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import logging
|
||||
from app.core.database import get_db
|
||||
from app.models.data_source import DataSource
|
||||
from app.api.auth import get_current_user
|
||||
from app.api.deps import require_workspace_admin, WorkspaceContext
|
||||
from app.api.deps import require_workspace_admin, WorkspaceContext, get_current_workspace_id
|
||||
from app.models.user import User
|
||||
from app.core.exceptions import NotFoundError, ValidationError
|
||||
from app.services.data_source_connector import DataSourceConnector
|
||||
@@ -60,11 +60,13 @@ async def get_data_sources(
|
||||
type: Optional[str] = None,
|
||||
status: Optional[str] = None,
|
||||
db: Session = Depends(get_db),
|
||||
current_user: User = Depends(get_current_user)
|
||||
current_user: User = Depends(get_current_user),
|
||||
workspace_id: str = Depends(get_current_workspace_id),
|
||||
):
|
||||
"""获取数据源列表"""
|
||||
query = db.query(DataSource).filter(
|
||||
DataSource.user_id == current_user.id
|
||||
DataSource.user_id == current_user.id,
|
||||
DataSource.workspace_id == workspace_id,
|
||||
)
|
||||
|
||||
if type:
|
||||
@@ -121,7 +123,8 @@ async def get_data_source(
|
||||
"""获取数据源详情"""
|
||||
data_source = db.query(DataSource).filter(
|
||||
DataSource.id == data_source_id,
|
||||
DataSource.user_id == current_user.id
|
||||
DataSource.user_id == current_user.id,
|
||||
DataSource.workspace_id == workspace_id,
|
||||
).first()
|
||||
|
||||
if not data_source:
|
||||
|
||||
Reference in New Issue
Block a user