新增修改商品
简要描述:
- 新增修改商品接口
请求URL:
http://192.168.12.86/s1saas/spos1/third/thirditem/insertorupdate
请求方式:
- POST
请求类型:
-
application/json
请求示例
{
"centerId": 2751,
"itemList":[{
"name":"克",
"delflg":0,
"itemCode":"2323",
"itemSpec":"规格",
"thirdClassId":"275100000000000001",
"thirdUnitId":"275100000000000001",
"isEnable":0,
"stdPrice":3.53,
"costPrice":5.23,
"isMostUnit":true,
"mainUnitFlag":0,
"thirdParentId":"275100000000000001",
"barList":[{
"barCode":"23232323"
},{
"barCode":"232378"
}],
"imgList":[{
"imgUrl":"https://wx-s1//0866.jpg",
"imgType":0
},{
"imgUrl":"https://wx-s1//0866.jpg",
"imgType":1
}],
"thirdCreatorId": "275100000000000001",
"thirdModifierId": "275100000000000001",
"thirdId":"275100000000000001",
"thirdItemId":"GYL275100000000000001"
},
{
"name":"克",
"delflg":0,
"itemCode":"2323",
"itemSpec":"规格",
"thirdClassId":"275100000000000001",
"thirdUnitId":"275100000000000001",
"isEnable":0,
"stdPrice":3.53,
"costPrice":5.23,
"isMostUnit":true,
"mainUnitFlag":0,
"thirdParentId":"275100000000000001",
"barList":[{
"barCode":"23232323"
},{
"barCode":"232378"
}],
"imgList":[{
"imgUrl":"https://wx-s1//0866.jpg",
"imgType":0
},{
"imgUrl":"https://wx-s1//0866.jpg",
"imgType":1
}],
"thirdCreatorId": "275100000000000001",
"thirdModifierId": "275100000000000001",
"thirdId":"275100000000000001",
"thirdItemId":"GYL275100000000000001"
}]
}
请求参数说明:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
centerId | 是 | Integer | 集团ID |
itemList | 是 | List<ThirdItemDetailCnd> | 品项信息集合 |
ThirdItemDetailCnd请求参数说明:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
name | 是 | String | 单位名称 |
delflg | 是 | Integer | 是否删除 |
itemCode | 否 | String | 品项编码 |
itemSpec | 是 | String | 品项规格 |
thirdClassId | 是 | String | 第三方分类id |
thirdUnitId | 是 | Stirng | 第三方单位id |
isEnable | 是 | Integer | 是否启用 0:启用 1:停用 |
stdPrice | 是 | BigDecimal | 原价价格 |
costPrice | 是 | BigDecimal | 成本价格 |
isMostUnit | 是 | Boolean | 是否多单位 |
mainUnitFlag | 是 | Boolean | 是否主单位 |
thirdParentId | 否 | String | 第三方父单位主键id |
barList | 否 | List<ThirdBarDetailCnd> | 条码集合 |
imgList | 否 | List<ThirdImgDetailCnd> | 图片集合 |
thirdCreatorId | 是 | String | 第三方创建人 |
thirdModifierId | 是 | String | 第三方修改人 |
thirdId | 是 | String | 第三方品项id |
thirdItemId | 否 | String | 第三方业务主键id |
ThirdBarDetailCnd请求参数说明:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
barCode | 否 | String | 条码 |
ThirdImgDetailCnd请求参数说明:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
imgUrl | 是 | String | 图片路径 |
imgType | 是 | Integer | 图片类型 0:静图 1:大图 2:动图 3:视频 4:副图 |
返回示例
{"result":0,"data":[
{
"thirdId":"275100000000000001",
"thirdItemId":"275100000000000001",
"id":275100000000000001,
"code":"001",
"name":"商品名称",
"classId":275100000000000001,
"unitId":275100000000000001,
"unitName":"克"
}
]}
**返回对象**
|参数名|类型|说明|
|:----- |:-----|-----|
|thirdId | String | 第三方id
|thirdItemId | String | 第三方业务主键id
|id | Long |龙收银id |
|code | String |龙收银系统品项编号 |
|name | String |品项名称 |
|classId | Long |分类id |
|unitId | Long |单位id |
|unitName | String |单位名称 |
**备注**
- 更多返回错误代码请看首页的错误代码描述