(no commit message provided)

This commit is contained in:
dxc
2026-02-09 11:44:24 +08:00
committed by dxc (aider)
parent 592830c213
commit 03aea51e9a

View File

@ -4,20 +4,19 @@ from .semi import inbound_semi_bp
from .base import inbound_base_bp from .base import inbound_base_bp
from .product import inbound_product_bp from .product import inbound_product_bp
from .inbound_summary import bp as inbound_summary_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__) inbound_bp = Blueprint('inbound', __name__)
# 导入 service 模块以注册路由 # 注册原有模块
from . import service
inbound_bp.register_blueprint(inbound_buy_bp, url_prefix='/buy') 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_semi_bp, url_prefix='/semi')
inbound_bp.register_blueprint(inbound_base_bp, url_prefix='/base') 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_product_bp, url_prefix='/product')
inbound_bp.register_blueprint(inbound_summary_bp, url_prefix='/summary') inbound_bp.register_blueprint(inbound_summary_bp, url_prefix='/summary')
# ★ [新增] 挂载 stock 模块,路径前缀为 /stock # ★ [修正] 注册 service 模块,前缀为 /service
# 最终访问路径例:/api/v1/inbound/stock/all # 最终访问路径: /api/v1/inbound/service
inbound_bp.register_blueprint(stock_bp, url_prefix='/stock') inbound_bp.register_blueprint(inbound_service_bp, url_prefix='/service')