dingdanquanliucheng/backend/app/services/supplier_service.py
2026-05-14 13:51:06 +08:00

31 lines
892 B
Python

class SupplierService:
# 供应商服务先返回演示数据,后续可以平滑替换为数据库查询。
def list_suppliers(self) -> dict:
return {
"total": 1,
"page_no": 1,
"page_size": 20,
"list": [
{
"supplier_id": 1001,
"supplier_name": "工厂A",
"supplier_type": "factory",
"contact_name": "王五",
"contact_mobile": "13800000001",
"template_type": "default",
"status": 1,
}
],
}
def create_supplier(self) -> dict:
return {
"supplier_id": 1002,
"supplier_name": "工厂B",
"supplier_type": "factory",
"status": 1,
}
supplier_service = SupplierService()