创建商品
POST
/goods最后修改时间: 1 年前
责任人:
请求参数
Body 参数application/json
name
string
商品名
categoryId
number
商品分类id
oldPrice
integer
商品原价格
newPrice
integer
商品新价格
desc
string
商品描述
status
integer
商品状态
0:下架 1:上架aa
imgUrl
string
商品照片url
inventoryCount
integer
商品库存数量
saleCount
integer
商品销售数量
favorCount
integer
商品收藏数量
address
string
发货地址
示例
{
"name": "aaa",
"categoryId": 1,
"oldPrice": 100,
"newPrice": 88,
"desc": "aaaa",
"status": 1,
"imgUrl": "www.itsiyuan.com/abc.png",
"inventoryCount": 100,
"saleCount": 100,
"favorCount": 199,
"address": "北京"
}
示例代码
返回响应
成功(200)
商品名已存在(400)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
data
string
必需
code
integer
必需
message
string
必需
示例
{
"data": "创建商品成功~",
"code": 200,
"message": "操作成功"
}
最后修改时间: 1 年前