简要描述:
请求域名:
请求URL:
POST/plugin.hotel.frontend.hotel.goods-buy
参数:
参数名 |
是否必须 |
类型 |
说明 |
dispatch_type_id |
否 |
int |
配送方式 |
address |
是 |
json |
地址信息 |
member_coupon_ids |
是 |
string |
优惠券id(逗号分隔) |
goods_id |
是 |
int |
商品id |
goods_option_id |
否 |
int |
规格id |
total |
是 |
int |
购买数量 |
invoice_type |
是 |
int |
发票类型(0:电子发票,1:纸质发票) |
rise_type |
是 |
int |
发票抬头(0:单位,1:个人) |
call |
是 |
string |
称呼 |
enter_at |
是 |
int |
租房开始时间 |
leave_at |
是 |
int |
租房结束时间 |
hotel_id |
是 |
int |
酒店id |
orders |
是否必须 |
类型 |
说明 |
pre_id |
是 |
int |
预下单id |
deduction_ids |
[deduction.code] |
抵扣码 |
|
note |
否 |
string |
订单备注 |
address |
是否必须 |
类型 |
说明 |
mobile |
是 |
int |
联系电话 |
username |
否 |
int |
入住人 |
province |
是 |
int |
省份 |
city |
是 |
int |
城市 |
district |
是 |
int |
区县 |
返回示例:
正确时返回:
{
"result": 1,
"msg": "成功",
"data": {
"total_price": "1500.00",
"total_goods_price": "1500.00",
"total_dispatch_price": "0.00",
"total_discount_price": "0.00",
"total_deduction_price": "0.00",
"orders": [
{
"plugin_id": 33,
"uid": 2455,
"uniacid": 6,
"dispatch_type_id": "0",
"mark": "0",
"goods_price": "1500.00",
"price": "1500.00",
"order_goods_price": "1500.00",
"cost_amount": "5.00",
"discount_price": "0.00",
"deduction_price": "0.00",
"dispatch_price": "0.00",
"goods_total": 1,
"is_virtual": false,
"order_sn": "SN20190124092009X0",
"create_time": "2019-01-24 09:20:09",
"note": null,
"shop_name": "酒店-坑比FBC",
"need_address": false,
"pre_id": "2e7f0d1c7ea9aa4bbbaefc024ea70d64",
"hotel_order": {
"hotel_id": "1",
"enter_at": "2019-01-22 00:00:00",
"leave_at": "2019-01-26 00:00:00"
},
"order_address": {
"street_id": 0
},
"order_goods": [
{
"goods_option_id": 0,
"goods_option_title": "",
"comment_status": 0,
"goods_id": 202,
"total": 1,
"uid": 2455,
"uniacid": 6,
"title": "酒店房间",
"thumb": "https://localhost/attachment/images/6/2018/04/yCfnKfcWicKXATi5fKI0watW8K0tz0.jpg",
"goods_sn": "",
"goods_price": "1500.00",
"price": "1500.00",
"goods_cost_price": "5.00",
"goods_market_price": "150.00",
"coupon_price": "0.00",
"need_address": 0,
"buttons": [
{
"name": "评价",
"api": "",
"value": ""
}
],
"order_goods_discounts": [
{
"discount_code": "shopGoodsMemberLevel",
"amount": "0.00",
"name": "全场会员等级优惠",
"uid": 2455
}
],
"order_goods_expansions": [ ],
"goods_option": null,
"order_goods_deductions": {
"0": {
"name": "爱心值",
"code": "love",
"uid": 2455,
"usable_amount": "0.00",
"usable_coin": 0,
"used_amount": "0.00",
"used_coin": 0
},
"1": {
"name": "积分",
"code": "point",
"uid": 2455,
"usable_amount": "480.00",
"usable_coin": 20.869565217391,
"used_amount": "0.00",
"used_coin": 0
}
}
}
],
"order_coupons": [ ],
"order_discounts": [
{
"discount_code": "shopGoodsMemberLevel",
"amount": "0.00",
"name": "全场会员等级优惠",
"uid": 2455
},
{
"discount_code": "deduction",
"amount": "0.00",
"name": "抵扣金额",
"uid": 2455
},
{
"discount_code": "deduction",
"amount": "0.00",
"name": "抵扣金额",
"uid": 2455
},
{
"discount_code": "singleEnoughReduce",
"amount": "0.00",
"name": "单品满减优惠",
"uid": 2455
},
{
"discount_code": "enoughReduce",
"amount": "0.00",
"name": "全场满减优惠",
"uid": 2455
},
{
"discount_code": "coupon",
"amount": "0.00",
"name": "优惠券优惠",
"uid": 2455
}
],
"order_deductions": {
"1": {
"code": "point",
"name": "积分",
"amount": "480.00",
"coin": 20.869565217391,
"checked": false
}
},
"has_one_dispatch_type": null
}
],
"discount": {
"member_coupons": [
{
"id": 4,
"uid": "2455",
"coupon_id": 9,
"used": 0,
"use_time": 0,
"get_time": "2018-05-02 13:41:32",
"is_member_deleted": 0,
"valid": true,
"checked": false,
"time_start": "2018-05-02",
"time_end": "不限时间",
"belongs_to_coupon": {
"id": 9,
"uniacid": 6,
"cat_id": 0,
"name": "满110立减50",
"get_type": 1,
"level_limit": -1,
"get_max": 10,
"use_type": 0,
"return_type": 0,
"bgcolor": "",
"enough": 110,
"coupon_type": 0,
"time_limit": 0,
"time_days": 0,
"time_start": "2018-04-28",
"time_end": "2018-05-05",
"coupon_method": 1,
"discount": "0.00",
"deduct": "50.00",
"back_type": 0,
"back_money": "",
"back_credit": "",
"back_redpack": "",
"back_when": 0,
"thumb": "",
"desc": null,
"total": 100,
"status": 1,
"money": "0.00",
"resp_desc": null,
"resp_thumb": "",
"resp_title": "",
"resp_url": "",
"credit": 0,
"usecredit2": 0,
"remark": "",
"descnoset": 0,
"display_order": 0,
"supplier_uid": 0,
"getcashier": 0,
"cashiersids": null,
"cashiersnames": null,
"category_ids": null,
"categorynames": null,
"goods_names": null,
"goods_ids": null,
"storeids": null,
"storenames": null,
"getstore": 0,
"getsupplier": 0,
"supplierids": null,
"suppliernames": null,
"createtime": 0,
"created_at": "2018-04-28",
"updated_at": "2018-05-07",
"deleted_at": null,
"is_complex": 1,
"plugin_id": 0
}
}
]
},
"dispatch": {
"default_member_address": null
}
}
}
错误时返回:
{
"result": 0,
"msg": "缺少访问参数",
"data": [ ]
}
{
"result": 0,
"msg": "未找到数据",
"data": [ ]
}
返回参数说明:
参数名 |
类型 |
说明 |
total_price |
float |
总金额 |
total_goods_price |
float |
总商品金额 |
total_dispatch_price |
float |
总运费 |
total_discount_price |
float |
总优惠 |
total_deduction_price |
float |
总抵扣 |
dispatch |
object |
配送 |
discount |
object |
优惠 |
orders |
[order]] |
订单集合 |
dispatch参数名 |
类型 |
说明 |
default_member_address |
object |
用户默认地址 |
default_member_address参数名 |
类型 |
说明 |
street_id |
int |
街道id |
mobile |
int |
联系电话 |
province_id |
int |
身份id |
city_id |
int |
城市id |
district_id |
int |
区县id |
address |
string |
地址 |
realname |
string |
姓名 |
discount参数名 |
类型 |
说明 |
member_coupons |
[member_coupon] |
用户优惠券集合 |
member_coupon参数名 |
类型 |
说明 |
id |
int |
用户优惠券id |
coupon_id |
int |
优惠券id |
get_time |
string |
领取时间 |
checked |
bool |
是否选中 |
time_start |
string |
开始使用时间 |
time_end |
string |
过期时间 |
belongs_to_coupon |
object |
所属优惠券 |
belongs_to_coupon参数名 |
类型 |
说明 |
id |
int |
用户优惠券id |
name |
string |
优惠券名 |
bgcolor |
string |
背景色 |
discount |
float |
优惠折扣哦 |
enough |
float |
金额限制 |
deduct |
float |
优惠金额 |
thumb |
string |
缩略图 |
desc |
string |
描述 |
categorynames |
string |
适用分类名 |
goods_names |
string |
适用商品名 |
storenames |
string |
适用门店名 |
suppliernames |
string |
适用供应商名 |
created_at |
string |
领取时间 |
order参数名 |
类型 |
说明 |
dispatch_type_id |
int |
配送方式id |
price |
float |
订单价 |
goods_price |
float |
商品总价 |
cost_amount |
float |
成本价 |
discount_price |
float |
优惠金额 |
deduction_price |
float |
抵扣金额 |
dispatch_price |
float |
配送费 |
is_virtual |
int |
是否为虚拟订单 |
goods_total |
int |
商品总件数 |
note |
string |
商品备注 |
shop_name |
string |
店铺名 |
pre_id |
sring |
预下单id |
order_goods |
[order_goods] |
订单商品集合 |
order_deductions |
[order_deductions ] |
订单抵扣集合 |
has_one_dispatch_type |
object |
配送方式 |
order_goods参数名 |
类型 |
说明 |
title |
string |
商品名 |
total |
int |
数量 |
goods_sn |
string |
商品编号 |
goods_id |
int |
商品id |
goods_option_id |
int |
商品规格id |
goods_option_title |
string |
商品规格标题 |
goods_option_id |
string |
商品缩略图地址 |
goods_price |
float |
商品总原价 |
price |
float |
商品总成交价 |
goods_cost_price |
float |
商品总成本价 |
goods_market_price |
float |
商品总市场价 |
order_deductions 参数名 |
类型 |
说明 |
coin |
float |
抵扣值 |
amount |
float |
抵扣金额 |
code |
string |
抵扣码 |
name |
string |
抵扣名 |
checked |
int |
是否选中 |
has_one_dispatch_type 参数名 |
类型 |
说明 |
id |
int |
配送方式id |
name |
string |
配送方式名 |
`` |
|
|
**错误时返回:**
- 缺少访问参数 - 商品ID
{
"result": 0,
"msg": "缺少访问参数",
"data": [ ]
}
- 未找到数据
{
"result": 0,
"msg": "未找到数据",
"data": [ ]
}
### 返回参数说明:
|参数名|类型|说明|
|:----- |:-----|-----|
| id | int | 订单 ID |
### 备注: