简要描述:

  • 返回订单详情

请求域名:

请求URL:

GET:route=plugin.ys-system.frontend.history-order.ys-detail

参数:

参数名 是否必须 类型 说明
order_id int 订单 ID

返回示例:

正确时返回:

{
	"result": 1,
	"msg": "详情",
	"data": {
		"id": 903,
		"order_sn": "SN2202221135CA5F15",
		"price": "200.00",
		"goods_price": "199.00",
		"goods_total": 2,
		"status": 3,
		"create_time": "2022-02-22 11:35:24",
		"finish_time": "1970-01-01 08:00:00",
		"pay_time": "1970-01-01 08:00:00",
		"send_time": "1970-01-01 08:00:00",
		"cancel_pay_time": "1970-01-01 08:00:00",
		"cancel_send_time": "1970-01-01 08:00:00",
		"dispatch_type_id": 0,
		"dispatch_price": "0.00",
		"discount_price": "0.00",
		"pay_type_id": 5,
		"order_goods_price": "200.00",
		"deduction_price": "0.00",
		"refund_id": 0,
		"is_plugin": 0,
		"change_price": "0.00",
		"change_dispatch_price": "0.00",
		"comment_status": 0,
		"order_pay_id": "",
		"plugin_id": 62,
		"is_virtual": 1,
		"mark": "",
		"is_pending": 0,
		"note": null,
		"cost_amount": "70.00",
		"shop_name": "益生线下收银",
		"no_refund": 1,
		"need_address": 1,
		"invoice_type": null,
		"rise_type": null,
		"collect_name": null,
		"company_number": null,
		"invoice": null,
		"auto_receipt": 0,
		"fee_amount": "0.00",
		"service_fee_amount": "0.00",
		"is_all_send_goods": 0,
		"close_reason": null,
		"ys_order_detail": [
			"商品折扣:0",
			"订单日期2022-03-18 10:49:44",
			"发货批次:0",
			"会员级别:1",
			"商品总额:100",
			"其他服务费:21"
		],
		"dispatch_type_name": "",
		"status_name": "交易完成",
		"pay_type_name": "后台",
		"button_models": [],
		"process": [],
		"has_many_order_goods": [{
				"id": 899,
				"uniacid": 6,
				"goods_id": 164,
				"pay_sn": "",
				"total": 1,
				"create_at": 0,
				"price": "100.00",
				"goods_sn": "",
				"uid": 2455,
				"thumb": "http://demo.yun.cn/static/upload/images/6/2018/06/hZqM1jQqjFmBhQ5JqQ48qSF5dmMMQZ.jpg",
				"title": "本地的哈哈步164",
				"goods_price": "99.00",
				"goods_option_id": 0,
				"goods_option_title": "",
				"product_sn": "",
				"created_at": "2022-02-22 11:35:24",
				"updated_at": "2022-02-22 11:35:24",
				"discount_price": "0.00",
				"comment_status": 0,
				"change_price": "0.00",
				"comment_id": 0,
				"goods_market_price": "1213.00",
				"goods_cost_price": "50.00",
				"vip_price": "0.00",
				"coupon_price": "0.00",
				"payment_amount": "100.00",
				"deduction_amount": "0.00",
				"need_address": 0,
				"order_express_id": null,
				"is_refund": 0,
				"buttons": [],
				"order": {
					"id": 903,
					"uniacid": 6,
					"uid": 2455,
					"order_sn": "SN2202221135CA5F15",
					"price": "200.00",
					"goods_price": "199.00",
					"goods_total": 2,
					"status": 3,
					"create_time": "2022-02-22 11:35:24",
					"is_deleted": 0,
					"is_member_deleted": 0,
					"finish_time": "1970-01-01 08:00:00",
					"pay_time": "1970-01-01 08:00:00",
					"send_time": "1970-01-01 08:00:00",
					"cancel_time": "1970-01-01 08:00:00",
					"created_at": 1645500924,
					"updated_at": 1645500924,
					"deleted_at": 0,
					"cancel_pay_time": "1970-01-01 08:00:00",
					"cancel_send_time": "1970-01-01 08:00:00",
					"dispatch_type_id": 0,
					"dispatch_price": "0.00",
					"discount_price": "0.00",
					"pay_type_id": 5,
					"order_goods_price": "200.00",
					"deduction_price": "0.00",
					"refund_id": 0,
					"is_plugin": 0,
					"change_price": "0.00",
					"change_dispatch_price": "0.00",
					"comment_status": 0,
					"order_pay_id": "",
					"plugin_id": 62,
					"is_virtual": 1,
					"mark": "",
					"is_pending": 0,
					"note": null,
					"cost_amount": "70.00",
					"shop_name": "益生线下收银",
					"no_refund": 1,
					"need_address": 1,
					"invoice_type": null,
					"rise_type": null,
					"collect_name": null,
					"company_number": null,
					"invoice": null,
					"auto_receipt": 0,
					"fee_amount": "0.00",
					"service_fee_amount": "0.00",
					"is_all_send_goods": 0,
					"close_reason": null,
					"status_name": "交易完成",
					"pay_type_name": "后台",
					"process": [],
					"has_one_pay_type": {
						"id": 5,
						"name": "后台",
						"plugin_id": 0,
						"code": "backend",
						"type": 1,
						"unit": "元",
						"updated_at": "2019-04-15 12:07:20",
						"created_at": null,
						"deleted_at": null,
						"setting_key": "",
						"need_password": 0,
						"group_id": 4
					},
					"has_one_behalf_pay": null
				}
			},
			{
				"id": 900,
				"uniacid": 6,
				"goods_id": 99,
				"pay_sn": "",
				"total": 1,
				"create_at": 0,
				"price": "100.00",
				"goods_sn": "",
				"uid": 2455,
				"thumb": "http://demo.yun.cn/static/upload/images/6/2018/04/yCfnKfcWicKXATi5fKI0watW8K0tz0.jpg",
				"title": "本地123",
				"goods_price": "100.00",
				"goods_option_id": 0,
				"goods_option_title": "",
				"product_sn": "",
				"created_at": "2022-02-22 11:35:25",
				"updated_at": "2022-02-22 11:35:25",
				"discount_price": "0.00",
				"comment_status": 0,
				"change_price": "0.00",
				"comment_id": 0,
				"goods_market_price": "200.00",
				"goods_cost_price": "20.00",
				"vip_price": "0.00",
				"coupon_price": "0.00",
				"payment_amount": "100.00",
				"deduction_amount": "0.00",
				"need_address": 0,
				"order_express_id": null,
				"is_refund": 0,
				"buttons": [],
				"order": {
					"id": 903,
					"uniacid": 6,
					"uid": 2455,
					"order_sn": "SN2202221135CA5F15",
					"price": "200.00",
					"goods_price": "199.00",
					"goods_total": 2,
					"status": 3,
					"create_time": "2022-02-22 11:35:24",
					"is_deleted": 0,
					"is_member_deleted": 0,
					"finish_time": "1970-01-01 08:00:00",
					"pay_time": "1970-01-01 08:00:00",
					"send_time": "1970-01-01 08:00:00",
					"cancel_time": "1970-01-01 08:00:00",
					"created_at": 1645500924,
					"updated_at": 1645500924,
					"deleted_at": 0,
					"cancel_pay_time": "1970-01-01 08:00:00",
					"cancel_send_time": "1970-01-01 08:00:00",
					"dispatch_type_id": 0,
					"dispatch_price": "0.00",
					"discount_price": "0.00",
					"pay_type_id": 5,
					"order_goods_price": "200.00",
					"deduction_price": "0.00",
					"refund_id": 0,
					"is_plugin": 0,
					"change_price": "0.00",
					"change_dispatch_price": "0.00",
					"comment_status": 0,
					"order_pay_id": "",
					"plugin_id": 62,
					"is_virtual": 1,
					"mark": "",
					"is_pending": 0,
					"note": null,
					"cost_amount": "70.00",
					"shop_name": "益生线下收银",
					"no_refund": 1,
					"need_address": 1,
					"invoice_type": null,
					"rise_type": null,
					"collect_name": null,
					"company_number": null,
					"invoice": null,
					"auto_receipt": 0,
					"fee_amount": "0.00",
					"service_fee_amount": "0.00",
					"is_all_send_goods": 0,
					"close_reason": null,
					"status_name": "交易完成",
					"pay_type_name": "后台",
					"process": [],
					"has_one_pay_type": {
						"id": 5,
						"name": "后台",
						"plugin_id": 0,
						"code": "backend",
						"type": 1,
						"unit": "元",
						"updated_at": "2019-04-15 12:07:20",
						"created_at": null,
						"deleted_at": null,
						"setting_key": "",
						"need_password": 0,
						"group_id": 4
					},
					"has_one_behalf_pay": null
				}
			}
		],
		"has_one_behalf_pay": null
	}
}

错误时返回:

  • 缺少访问参数 -- order_id
{
    "result": 0,
    "msg": "缺少访问参数",
    "data": []
}
  • 未找到数据
{
	"result": 0,
	"msg": "未找到数据",
	"data": []
}

返回参数说明:

button_models 类型 说明
ys_order_detail array 益生订单详情
order_goods_price int 应收价格
price int 实收价格
参数名 类型 说明
id int 订单 ID
order_sn string 订单号
price int 订单金额(实际支付)
goods_price int 商品金额
goods_total int 所有商品的数量
goods_option_title int 规格标题
status_name string 订单状态
invoice_type int 发票类型(0:电子发票,1:纸质发票)
rise_type int 发票抬头(0:单位,1:个人)
call string 称呼
ncompany_numberote string 单位识别号
invoice_state int 发票状态 (0:未开启,1:已开启)
button_models array 按钮
has_many_order_goods array 该订单下的商品列表
dispatch_type_id int 订单配送方式(1快递, 2自提, 3门店配送)
button_models 类型 说明
name string 按钮文字
api string 按钮关联的 API 路径
value int 显示在 HTML 表单的 Value 值
button_models key 按钮名
1 支付
5 确认收货
8 查看物流
9 取消订单
10 评论
12 删除订单
13 申请退款
18 已退款/退款中
19 已评价
20 确认核销
21 转账信息
27 查看卡密
41 联系客服
101 自定义申请退款
has_many_order_goods 类型 说明
goods_id int 商品 ID
goods_price int 商品价格
total int 订单中该商品的数量
goods_option_title int 订单中该商品的规格标题
price int 实际支付的该商品的总价
title string 商品名称
thumb string 商品图片
diyform_data 自定义表单数据
order_fees 类型 说明
name int 手续费名
amount float 手续费金额
addres_info参数名 类型 说明 dispatch_type_id 为 1 , 是快递
address string 地址
realname string 姓名
mobile string 手机号
addres_info参数名 类型 说明 dispatch_type_id 为 2 或者 3 , 是自提和门店配送
store_address string 地址
member_mobile string 手机号
member_realname string 姓名

| is_course | int | 0:不是课程商品 1:是课程商品 |

备注:

by 腾昌 18/12/14 修改(dispatch_type_id配送方式不同, address_info也不同)