POST api/EShop/CartProductChange?DomainId={DomainId}&AccountId={AccountId}&PersonId={PersonId}
商场购物车添加或修改产品数量 商品数量不能为负数 商品数量为0时在购物车删除商品 返回值 返回当前商品在购物车的价格数量 Action传add代表在原有数量增加 edit表示直接将购物车内的数量设置为当前数量
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| DomainId |
域Id |
globally unique identifier |
None. |
| AccountId |
账户Id |
globally unique identifier |
None. |
| PersonId |
人员Id |
globally unique identifier |
None. |
Body Parameters
CartProductChangeVM| Name | Description | Type | Additional information |
|---|---|---|---|
| ProductID |
商品ID |
globally unique identifier |
None. |
| Count |
在购物车的数量 |
integer |
None. |
| isChecked |
是否选中 |
boolean |
None. |
| Action |
添加 删除 还是修改 |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"ProductID": "3627769b-cdd2-4698-b353-f327fc3095dd",
"Count": 2,
"isChecked": true,
"Action": "sample string 4"
}
application/xml, text/xml
Sample:
<CartProductChangeVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/JT.VSFA.App.WebAPI.Areas.EShop.ViewModel"> <Action>sample string 4</Action> <Count>2</Count> <ProductID>3627769b-cdd2-4698-b353-f327fc3095dd</ProductID> <isChecked>true</isChecked> </CartProductChangeVM>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ResultModelOfObject| Name | Description | Type | Additional information |
|---|---|---|---|
| Code | ReturnCode |
None. |
|
| Message | string |
None. |
|
| Data | Object |
None. |
Response Formats
application/json, text/json
Sample:
{
"Code": 200,
"Message": "sample string 1",
"Data": {}
}
application/xml, text/xml
Sample:
<ResultModelOfanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/JT.VSFA.Utility"> <Code>Success</Code> <Data /> <Message>sample string 1</Message> </ResultModelOfanyType>