feat(shipping-notice): 添加订单抽取功能,支持异步运行和管理,优化相关数据模型和处理逻辑

This commit is contained in:
hugo committed 2026-07-21 09:02:42 +08:00
1 parent 34d489a2d1
commit ce26d6d0c4
144 files changed
+12241 -4233

No files matched your search

+7 -2
View File
@@ -1342,9 +1342,14 @@ def home():
def _load_home_payload():
if user.role == 'admin':
agent_rows = Agent.query.filter(Agent.is_active.is_(True)).all()
agent_rows = Agent.query.filter(
Agent.is_active.is_(True), Agent.exposure_mode == 'workspace',
).all()
else:
agent_rows = [agent for agent in user.agents if agent.is_active]
agent_rows = [
agent for agent in user.agents
if agent.is_active and agent.exposure_mode == 'workspace'
]
agent_rows = sort_agent_rows(agent_rows)
favorites = db.session.query(UserFavoriteAgent).filter_by(user_id=user.id).all()
favorite_ids = [f.agent_id for f in favorites]