Authored by qianjun

add express

  1 +# 订单服务接口
  2 +
  3 +## 接口列表
  4 +| 接口名称 | 接口描述 |
  5 +| --------| -------- |
  6 +|[订单列表](#1)||
  7 +|[订单详情](#2)||
  8 +|[取消订单](#3)||
  9 +|[删除订单](#4)||
  10 +|[确认订单](#5)||
  11 +|[获取电子票列表](#6)||
  12 +|[获取YOHO赠品](#7-yoho)||
  13 +|[购物车列表](#8)||
  14 +|[获取待处理订单总数](#9)||
  15 +
  16 +
  17 +
  18 +## 接口描述
  19 +
  20 +### 1、订单列表
  21 +
  22 +#### 说明
  23 +订单列表
  24 +#### 请求参数
  25 +| Param Name | Param Type | Required | Param Value | Desc |
  26 +| :-- | --: | --: | --: | --: |
  27 +| method | string | true | app.SpaceOrders.get| 请求方法 不可变 |
  28 +| uid | int | true | 1 | |
  29 +| type | int | true | 1 | 订单类型 1:全部订单,2:待付款,3:待发货,4:待收货,5:待评论/成功订单,7:失败/取消 |
  30 +| page | int | false | 1 | 页数 |
  31 +| limit | int | false | 10 | 每页大小 |
  32 +
  33 +#### 响应内容
  34 +```json
  35 +{
  36 + "code": 200,
  37 + "data": {
  38 + "order_list": [
  39 + {
  40 + "id": "5528982",
  41 + "order_code": "1519273880",
  42 + "parent_order_code": "0",
  43 + "order_type": 1,
  44 + "refund_status": 0,
  45 + "uid": "5772257",
  46 + "create_time": "1449633428",
  47 + "update_time": "1449633455",
  48 + "pay_expire": "2015-12-09 13:57:08",
  49 + "payment": "2",
  50 + "payment_status": "Y",
  51 + "payment_type": "1",
  52 + "payment_type_str": "在线支付",
  53 + "status": 1,
  54 + "status_str": "已付款",
  55 + "attribute": "5",
  56 + "is_cancel": "N",
  57 + "is_comment": "N",
  58 + "amount": "1.00",
  59 + "shipping_cost": "0.00",
  60 + "use_limit_code": "N",
  61 + "user_confirm_paid": "N",
  62 + "buy_total": 1,
  63 + "order_goods": [
  64 + {
  65 + "buy_number": 1,
  66 + "goods_id": 125106,
  67 + "goods_image": "http://img10.static.yhbimg.com/goodsimg/2014/06/19/02/0118c2721e4f2219f69539dd389f4bacac.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
  68 + "goods_price": "1.00",
  69 + "goods_type": "ordinary",
  70 + "goods_amount": "1.00",
  71 + "product_id": 84230,
  72 + "product_name": "004 满版龙纹迷彩七分休闲裤",
  73 + "product_skn": 51055461,
  74 + "refund_num": 0,
  75 + "size_name": "M",
  76 + "color_name": "彩色",
  77 + "cn_alphabet": "004QiFenBuKu004PA095",
  78 + "expect_arrival_time": ""
  79 + }
  80 + ]
  81 + }
  82 + ],
  83 + "page": 1,
  84 + "page_total": 27,
  85 + "total": 265
  86 + },
  87 + "message": "ok"
  88 +}
  89 +```
  90 +##### 响应内容描述
  91 +| Param Name | Param Type | Desc |
  92 +| ---------- | ---------- | ---- |
  93 +| page | int | 当前页数 |
  94 +| page_total | int | 总页数 |
  95 +| total | int | 总记录数 |
  96 +| order_list | json | 订单列表 |
  97 +| id | string | |
  98 +| order_code | string | |
  99 +| parent_order_code | string | |
  100 +| order_type | int | 订单类型 1:有货,3:iphone,4:android,5:淘宝,6:h5,7:是换货,9:渠道,20:ipad |
  101 +| refund_status | int | 退货状态(该字段基本不用了)0:正常订单,1:退货审核中,2:退货审核不通过,3:退货审核通过,4:退货商品寄回,5:退货库房入库,6:财务退款,7:完成 |
  102 +| uid | string | |
  103 +| create_time| string | 创建时间 |
  104 +| update_time| string | 更新时间 |
  105 +| pay_expire | string | 支付超期时间 |
  106 +| payment | string | 支付方式编号 |
  107 +| payment_status | string | 支付状态 Y:已支付,N:未支付 |
  108 +| payment_type | string | 支付方式 1:在线支付,2:货到付款,3:现金支付,4:抵消支付 |
  109 +| status | int | 状态 0:待付款,1-3:待发货,4-5:待收货(0:未付款,1:已付款,2:备货中,3:配货中,4:已发货,5:运输中,6:已完成)|
  110 +| status_str | string | 状态名称 |
  111 +| is_cancel | string | 是否取消 Y:已取消,N:未取消 |
  112 +| is_comment | string | 是否评论 Y:已评论,N:未评论 |
  113 +| amount | string | 订单金额 |
  114 +| shipping_cost | string | 运费 |
  115 +| use_limit_code | string | 使用限购码 Y:使用,N:未使用 |
  116 +| user_confirm_paid| string | 用户确认支付 Y:是,N:否 |
  117 +| buy_total | int | 购买商品数量 |
  118 +| order_goods| json | 购买商品 |
  119 +| buy_number | int | 购买商品数量 |
  120 +| goods_id | int | |
  121 +| goods_image| string | 商品默认图片 |
  122 +| goods_price| string | 商品价格 |
  123 +| goods_type | string | 商品类型 ordinary:普通商品 |
  124 +| goods_amount | string | 商品总价格 |
  125 +| product_id | int | |
  126 +| product_name | string | 商品名称 |
  127 +| product_skn| int | 商品skn |
  128 +| refund_num | int | 退货数量 |
  129 +| size_name | string | 商品尺寸 |
  130 +| color_name | string | 商品颜色 |
  131 +| cn_alphabet| string | |
  132 +| expect_arrival_time | string | 预期到货时间 |
  133 +
  134 +
  135 +### 3、取消订单
  136 +
  137 +#### 说明
  138 +根据订单号取消订单
  139 +#### 请求参数
  140 +| Param Name | Param Value | Desc|
  141 +| :-------- | --------------:|----:|
  142 +| method | app.SpaceOrders.close| 请求方法 |
  143 +| order_code | 1061003682 | 订单号 |
  144 +
  145 +#### 响应内容
  146 +```json
  147 +{
  148 +"code":200,
  149 +"message":"订单取消成功"
  150 +}
  151 +```
  152 +
  153 +### 5、确认订单
  154 +
  155 +#### 说明
  156 +根据订单号确认订单
  157 +#### 请求参数
  158 +| Param Name | Param Value | Desc|
  159 +| :-------- | --------------:|----:|
  160 +| method | app.SpaceOrders.confirm| 请求方法 |
  161 +| order_code | 1061003682 | 订单号 |
  162 +
  163 +#### 响应内容
  164 +```json
  165 +{
  166 +"code":200,
  167 +"message":"订单确认成功"
  168 +}
  169 +```
  170 +
  171 +
  172 +### 6、获取电子票列表
  173 +
  174 +
  175 +
  176 +#### 说明
  177 +根据订单号获取电子票列表
  178 +#### 请求参数
  179 +| Param Name | Param Value | Desc|
  180 +| :-------- | --------------:|----:|
  181 +| method | app.SpaceOrders.getQrByOrderCode| 请求方法 |
  182 +| order_code | 1061003682 | 订单号 |
  183 +
  184 +#### 响应内容
  185 +```json
  186 +{
  187 + "code": 200,
  188 + "data": {
  189 + "ticks": [{
  190 + "ticket_code":"8611779901",
  191 + "qr_image":"http://img06.static.yhbimg.com/yohood/4063/ticket-8611779901-1-40-1-1.jpg",
  192 + "passkit":"Y"
  193 + }],
  194 + "title": "FURY ANIMALS Normal迷彩系列BUNNY短袖TEE"
  195 + },
  196 + "md5": "24aff7ba505dccb63a14b5d78ae22821",
  197 + "message": "ok"
  198 +}
  199 +```
  200 +##### 响应内容描述
  201 +| Param Name | Param Type | Desc |
  202 +| ---------- | ---------- | ---- |
  203 +| title | string | 商品名称 |
  204 +| ticks | json | 电子票 |
  205 +| ticket_code| string | 电子票code |
  206 +| qr_image | string | 电子票code二维码图片路径 |
  207 +| passkit | string | |
  208 +
  209 +### 7、获取YOHO赠品
  210 +
  211 +#### 说明
  212 +根据skn获取yohoGift
  213 +#### 请求参数
  214 +| Param Name | Param Value | Desc|
  215 +| :-------- | --------------:|----:|
  216 +| method | web.Shopping.yohoGift| 请求方法 |
  217 +| skn_list | [50001829,50002280]| skn列表 |
  218 +
  219 +#### 响应内容
  220 +```json
  221 + {
  222 + "alg": "SALT_MD5",
  223 + "code": 200,
  224 + "data":
  225 + [
  226 + {
  227 + "default_pic": "http://img11.static.yhbimg.com/goodsimg/2012/03/02/17/019a0794f1eb1ad77ce5d8a2c2b2cf2e50.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
  228 + "id": 3,
  229 + "price":
  230 + {
  231 + "sales_price": 250,
  232 + "yoho_coin_num": 0
  233 + },
  234 + "product_name": "OVERKILL 天使山羊TEE",
  235 + "storage": 0,
  236 + "storage_list":
  237 + [
  238 + {
  239 + "erp_sku_id": 102009,
  240 + "goods_dimension_id": 201,
  241 + "goods_id": 3,
  242 + "product_id": 3,
  243 + "size":
  244 + {
  245 + "size_name": "L"
  246 + },
  247 + "storage_num": 0
  248 + },
  249 + {
  250 + "erp_sku_id": 102010,
  251 + "goods_dimension_id": 203,
  252 + "goods_id": 3,
  253 + "product_id": 3,
  254 + "size":
  255 + {
  256 + "size_name": "M"
  257 + },
  258 + "storage_num": 0
  259 + },
  260 + {
  261 + "erp_sku_id": 102012,
  262 + "goods_dimension_id": 211,
  263 + "goods_id": 3,
  264 + "product_id": 3,
  265 + "size":
  266 + {
  267 + "size_name": "XL"
  268 + },
  269 + "storage_num": 0
  270 + }
  271 + ],
  272 + "url": "http://www.yohobuy.com/product/pro_3_3/OVERKILL TianShiShanYangTEE.html"
  273 + },
  274 + {
  275 + "default_pic": "http://img10.static.yhbimg.com/goodsimg/2011/06/23/04/0158a984a768a351328138ea3671e270de.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
  276 + "id": 5,
  277 + "price":
  278 + {
  279 + "sales_price": 138,
  280 + "yoho_coin_num": 0
  281 + },
  282 + "product_name": "MANIA TAKI X 圆领印花短袖TEE",
  283 + "storage": 0,
  284 + "storage_list":
  285 + [
  286 + {
  287 + "erp_sku_id": 102015,
  288 + "goods_dimension_id": 213,
  289 + "goods_id": 5,
  290 + "product_id": 5,
  291 + "size":
  292 + {
  293 + "size_name": "XS"
  294 + },
  295 + "storage_num": 0
  296 + }
  297 + ],
  298 + "url": "http://www.yohobuy.com/product/pro_5_5/MANIA TAKI X YuanLingYinHuaDuanXiuTEE.html"
  299 + }
  300 + ],
  301 + "md5": "d6e4c90434e98a90555d864cf4798679",
  302 + "message": "操作成功"
  303 + }
  304 +```
  305 +
  306 +### 8、购物车列表
  307 +
  308 +#### 说明
  309 +
  310 +#### 请求参数
  311 +| Param Name | Param Value | Desc|
  312 +| :-------- | --------------:|----:|
  313 +| method | app.Shopping.cart| 请求方法 |
  314 +| shopping_key | 9c101f734768105aafc792d460d12206 | |
  315 +| uid | 10166061 | |
  316 +
  317 +#### 响应内容
  318 +```json
  319 +{
  320 + "code": 200,
  321 + "data": {
  322 + "advance_cart_data": {
  323 + "gift_list": [],
  324 + "goods_list": [],
  325 + "price_gift": [],
  326 + "promotion_info": [],
  327 + "shopping_cart_data": {
  328 + "discount_amount": 0,
  329 + "fast_shopping_cost": 0,
  330 + "gain_yoho_coin": 0,
  331 + "goods_count": 0,
  332 + "last_order_amount": 0,
  333 + "order_amount": 0,
  334 + "promotion_formula": "总计¥0.00=商品金额¥0.00",
  335 + "promotion_formula_list": [
  336 + {
  337 + "promotion": "商品金额",
  338 + "promotion_amount": "¥0.00"
  339 + }
  340 + ],
  341 + "selected_goods_count": 0,
  342 + "shipping_cost": 0,
  343 + "str_discount_amount": "¥0.00",
  344 + "str_order_amount": "¥0.00"
  345 + },
  346 + "sold_out_goods_list": []
  347 + },
  348 + "ordinary_cart_data": {
  349 + "gift_list": [],
  350 + "goods_list": [
  351 + {
  352 + "attribute": "1",
  353 + "brand_id": "350",
  354 + "buy_limit": 0,
  355 + "buy_number": "1",
  356 + "color_id": "7",
  357 + "color_name": "蓝色",
  358 + "expect_arrival_time": "",
  359 + "fit_promotions": [
  360 + "8579",
  361 + "8479",
  362 + "8477",
  363 + "8475"
  364 + ],
  365 + "get_yoho_coin": "0",
  366 + "goods_id": "404795",
  367 + "goods_images": "http://....jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
  368 + "goods_type": "ordinary",
  369 + "is_advance": "N",
  370 + "is_jit": "N",
  371 + "is_limited": "N",
  372 + "is_outlets": "N",
  373 + "is_special": "N",
  374 + "last_price": "319.0",
  375 + "last_vip_price": 369,
  376 + "market_price": 369,
  377 + "max_sort_id": "7",
  378 + "middle_sort_id": "49",
  379 + "product_id": 314449,
  380 + "product_name": "MACROPUS 复古帆布系列 双肩包(男女通用)",
  381 + "product_skc": "306652",
  382 + "product_skn": "51174830",
  383 + "product_sku": "967008",
  384 + "promotion_flag": "103",
  385 + "promotion_id": "0",
  386 + "real_price": 319,
  387 + "real_vip_price": 0,
  388 + "sale_price": 0,
  389 + "sales_price": 369,
  390 + "selected": "Y",
  391 + "shop_id": 0,
  392 + "shopping_cart_goods_id": "94305847",
  393 + "shopping_cart_id": "130769237",
  394 + "size_id": "199",
  395 + "size_name": "F",
  396 + "small_sort_id": "152",
  397 + "storage_number": "99",
  398 + "str_subtotal": "¥369.00",
  399 + "subtotal": 369,
  400 + "supplier_id": 0,
  401 + "uid": "10166061",
  402 + "vip1_price": "350.55",
  403 + "vip2_price": "332.10",
  404 + "vip3_price": "324.72",
  405 + "vip_discount": 1,
  406 + "vip_discount_money": 0,
  407 + "vip_discount_type": "1",
  408 + "vip_price": 0,
  409 + "yoho_coin_num": "0"
  410 + }
  411 + ],
  412 + "price_gift": [
  413 + {
  414 + "gift_price": 39,
  415 + "goods_list": [
  416 + {
  417 + "goods_images": "http://...jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
  418 + "last_price": 39,
  419 + "market_price": 90,
  420 + "product_id": 269401,
  421 + "product_name": "VOCHIC 欧式多用抗菌艺术砧板",
  422 + "product_skn": 51150012,
  423 + "sales_price": 49,
  424 + "storage_number": 150
  425 + }
  426 + ],
  427 + "max_select_number": "1",
  428 + "promotion_id": 8475,
  429 + "promotion_title": "【全场39元加价购】",
  430 + "promotion_type": "Needpaygift"
  431 + }
  432 + ],
  433 + "promotion_info": [
  434 + {
  435 + "cutdown_amount": 50,
  436 + "promotion_id": 8579,
  437 + "promotion_title": "【包配随行】满¥299减¥50",
  438 + "promotion_type": "Cashreduce"
  439 + }
  440 + ],
  441 + "shopping_cart_data": {
  442 + "discount_amount": 50,
  443 + "fast_shopping_cost": 15,
  444 + "gain_yoho_coin": 0,
  445 + "goods_count": 1,
  446 + "last_order_amount": 319,
  447 + "order_amount": 369,
  448 + "promotion_formula": "总计¥319.00=商品金额¥369.00-活动金额¥50.00",
  449 + "promotion_formula_list": [
  450 + {
  451 + "promotion": "商品金额",
  452 + "promotion_amount": "¥369.00"
  453 + }
  454 + ],
  455 + "selected_goods_count": 1,
  456 + "shipping_cost": 10,
  457 + "str_discount_amount": "¥50.00",
  458 + "str_order_amount": "¥369.00"
  459 + },
  460 + "sold_out_goods_list": []
  461 + }
  462 + },
  463 + "md5": "d222cf08c9d43d0c5f3ab31d278cabd8",
  464 + "message": "cart goods list."
  465 +}
  466 +```
  467 +
  468 +
  469 +### 9、获取待处理订单总数
  470 +
  471 +#### 说明
  472 +根据获取待处理订单总数
  473 +#### 请求参数
  474 +| Param Name | Param Value | Desc |
  475 +| ---------- | ----------- | ---- |
  476 +| method | web.SpaceOrders.getPendingOrderCount| 请求方法 |
  477 +| uid | 5772257 | |
  478 +
  479 +#### 响应内容
  480 +
  481 +```json
  482 +{
  483 + "code": 200,
  484 + "message": "操作成功"
  485 + "data": {
  486 + "count": 100
  487 + }
  488 +}
  489 +```