24 lines
577 B
Python
24 lines
577 B
Python
from fastapi import APIRouter
|
|
|
|
# 商品一
|
|
GoodsRouter1 = APIRouter()
|
|
|
|
@GoodsRouter1.get("/goods1",summary='查询商品1信息')
|
|
def get_goods():
|
|
return '查询商品1信息'
|
|
|
|
@GoodsRouter1.post("/goods1",summary='新增商品1信息')
|
|
def post_goods():
|
|
return '新增商品1信息'
|
|
|
|
# 商品二
|
|
|
|
GoodsRouter2 = APIRouter()
|
|
|
|
@GoodsRouter2.get("/goods2",summary='查询商品2信息')
|
|
def get_goods():
|
|
return '查询商品2信息'
|
|
|
|
@GoodsRouter2.post("/goods2",summary='新增商品1信息')
|
|
def post_goods():
|
|
return '新增商品2信息' |