From 03aea51e9a7e99a0592c6d0d35e5adf466e8f974 Mon Sep 17 00:00:00 2001 From: dxc Date: Mon, 9 Feb 2026 11:44:24 +0800 Subject: [PATCH] (no commit message provided) --- inventory-backend/app/api/v1/inbound/__init__.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/inventory-backend/app/api/v1/inbound/__init__.py b/inventory-backend/app/api/v1/inbound/__init__.py index 7dbaf5a..b83c39e 100644 --- a/inventory-backend/app/api/v1/inbound/__init__.py +++ b/inventory-backend/app/api/v1/inbound/__init__.py @@ -4,20 +4,19 @@ from .semi import inbound_semi_bp from .base import inbound_base_bp from .product import inbound_product_bp from .inbound_summary import bp as inbound_summary_bp -# ★ [新增] 导入 stock 模块 -from .stock import bp as stock_bp + +# ★ [修正] 正确导入 service 模块的蓝图 (假设你在 service.py 里定义的是 bp) +from .service import bp as inbound_service_bp inbound_bp = Blueprint('inbound', __name__) -# 导入 service 模块以注册路由 -from . import service - +# 注册原有模块 inbound_bp.register_blueprint(inbound_buy_bp, url_prefix='/buy') inbound_bp.register_blueprint(inbound_semi_bp, url_prefix='/semi') inbound_bp.register_blueprint(inbound_base_bp, url_prefix='/base') inbound_bp.register_blueprint(inbound_product_bp, url_prefix='/product') inbound_bp.register_blueprint(inbound_summary_bp, url_prefix='/summary') -# ★ [新增] 挂载 stock 模块,路径前缀为 /stock -# 最终访问路径例:/api/v1/inbound/stock/all -inbound_bp.register_blueprint(stock_bp, url_prefix='/stock') +# ★ [修正] 注册 service 模块,前缀设为 /service +# 最终访问路径: /api/v1/inbound/service +inbound_bp.register_blueprint(inbound_service_bp, url_prefix='/service') \ No newline at end of file