|
|
## 确认订单
|
|
|
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | order.orderStatus |
|
|
|
|
|
|
```json
|
|
|
{"orderCode":100000,"status":700}
|
|
|
```
|
|
|
|
|
|
## 取消订单
|
|
|
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | order.orderStatus |
|
|
|
|
|
|
> 用户主动取消
|
|
|
```json
|
|
|
{"order_code":100000,"status":900}
|
|
|
```
|
|
|
> 系统自动取消
|
|
|
```json
|
|
|
{"order_code":100000,"status":906}
|
|
|
```
|
|
|
|
|
|
## 订单状态同步
|
|
|
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | order.erpstatus |
|
|
|
|
|
|
|
|
|
> 修改订单收货人地址
|
|
|
```json
|
|
|
{"order_code":100000,"status":200}
|
|
|
```
|
|
|
### 注意:200是已标记状态,准备打印地址单
|
|
|
|
|
|
> 已交寄
|
|
|
```json
|
|
|
{
|
|
|
"order_code":100000,
|
|
|
"status":600,
|
|
|
"data":{
|
|
|
"express_id": 23,
|
|
|
"express_number":"25276134639"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
> 订单妥投
|
|
|
```json
|
|
|
{"order_code":100000,"status":700}
|
|
|
```
|
|
|
> 客服取消
|
|
|
```json
|
|
|
{"order_code":100000,"status":901}
|
|
|
```
|
|
|
> 系统自动取消
|
|
|
```json
|
|
|
{"order_code":100000,"status":906}
|
|
|
```
|
|
|
|
|
|
|
|
|
## 前台创建换货单
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | order.createChangeOrder |
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"id": 1,
|
|
|
"city": "南京市",
|
|
|
"area_code": "320115",
|
|
|
"address": "江宁经济技术开发区苏源大道87号(有货物流中心订单组)",
|
|
|
"consignee_name": "测试",
|
|
|
"county": "江宁区",
|
|
|
"delivery_tpye": 10,
|
|
|
"email": "",
|
|
|
"exchange_mode": 10,
|
|
|
"mobile": "13776693005",
|
|
|
"order_code": 16062099,
|
|
|
"init_order_code": 16062099,
|
|
|
"source_order_code": 16062099,
|
|
|
"province": "江苏省",
|
|
|
"receipt_time": "2",
|
|
|
"remark": "用户换货",
|
|
|
"uid": 8041518,
|
|
|
"zip_code": "211100",
|
|
|
"goods": [
|
|
|
{
|
|
|
"exchange_reason": "3",
|
|
|
"goods_type": "1",
|
|
|
"last_price": "88.00",
|
|
|
"new_goods_id": 354687,
|
|
|
"new_product_skc": 279434,
|
|
|
"new_product_sku": 892152,
|
|
|
"product_skc": 279434,
|
|
|
"product_skn": 51152761,
|
|
|
"product_sku": 892152,
|
|
|
"remark": ""
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## ERP创建换货单
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | erp.createChangeOrder |
|
|
|
|
|
|
> 成功
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"message": "ok",
|
|
|
"data": {
|
|
|
"id": 1,
|
|
|
"init_order_code": "111",
|
|
|
"source_order_code": 1111,
|
|
|
"new_order_code": 1111,
|
|
|
"exchange_id": 111,
|
|
|
"returned_id": 111,
|
|
|
"exchange_status": 10,
|
|
|
"returned_status": 10
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
> 客服驳回
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"code":500,
|
|
|
"message":"error",
|
|
|
"data":{
|
|
|
"id": 1,
|
|
|
"init_order_code": "111",
|
|
|
"source_order_code": 1111,
|
|
|
"new_order_code": 1111,
|
|
|
"exchange_id": 111,
|
|
|
"returned_id": 111,
|
|
|
"exchange_status": 91, // 客服驳回
|
|
|
"returned_status": 91 // 客服驳回
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## 前台更新换货快递信息
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | order.updateChangeRefundOrderExpressInfo |
|
|
|
|
|
|
```json
|
|
|
{ "id":1,
|
|
|
"apply_id":40,
|
|
|
"express_number":"603596395359",
|
|
|
"express_name":"顺丰",
|
|
|
"express_id":"23",
|
|
|
type:"change" // 表示类型为换货
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## ERP更新换货单状态
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | erp.updateChangeRefundOrderStatus |
|
|
|
> 审核通过
|
|
|
```json
|
|
|
{
|
|
|
"id":1, // id为erp系统换货单id唯一主键
|
|
|
"status":10,
|
|
|
"type":"change" //"change" 表示换货类型,"refund"表示退货类型
|
|
|
}
|
|
|
```
|
|
|
> 商品入库(仅商品寄回发该状态)
|
|
|
```json
|
|
|
{
|
|
|
"id":1, // id为erp系统换货单id唯一主键
|
|
|
"status":30,
|
|
|
"type":"change" //"change" 表示换货类型,"refund"表示退货类型
|
|
|
}
|
|
|
```
|
|
|
> 上门换货(仅上门换货发该状态)
|
|
|
```json
|
|
|
{
|
|
|
"id":1, // id为erp系统换货单id唯一主键
|
|
|
"status":40,
|
|
|
"type":"change" //"change" 表示换货类型,"refund"表示退货类型
|
|
|
}
|
|
|
```
|
|
|
> 换货完成
|
|
|
```json
|
|
|
{
|
|
|
"id":1, // id为erp系统换货单id唯一主键
|
|
|
"status":50,
|
|
|
"type":"change" //"change" 表示换货类型,"refund"表示退货类型
|
|
|
}
|
|
|
```
|
|
|
|
|
|
|
|
|
## 前台创建退货单
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | order.createRefundOrder |
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"uid": "3342109",
|
|
|
"alipay_account": "13912008849",
|
|
|
"alipay_name": "xxxx",
|
|
|
"area_code": "area_code",
|
|
|
"bank_card": "6228480605428963215",
|
|
|
"bank_name": "中国农业银行",
|
|
|
"city": "南京市",
|
|
|
"county": "",
|
|
|
"order_code": "308545172",
|
|
|
"payee_name": "张璐",
|
|
|
"province": "江苏省",
|
|
|
"remark": "尺寸不合适",
|
|
|
"return_amount_mode": "2",
|
|
|
"order_returned_id":123,//前台表生成的退货订单主键,其余字段同老接口
|
|
|
"returned_goods_list": [
|
|
|
{
|
|
|
"product_sku": "383669",
|
|
|
"goods_type": "1",
|
|
|
"last_price": "334",
|
|
|
"returned_reason": "1",
|
|
|
"remark": "尺寸不合适",
|
|
|
"evidence_images": ""
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
|
|
|
## ERP创建退货单
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | erp.createRefundOrder |
|
|
|
|
|
|
|
|
|
> 成功
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"message": "ok",
|
|
|
"data": {
|
|
|
"id":1, //前台退货id唯一主键
|
|
|
"returned_id":1, //returned_id为erp退货id唯一主键
|
|
|
"returned_status":10,
|
|
|
"real_returned_amount":100,
|
|
|
"is_return_coupon":"N",
|
|
|
"return_yoho_coin":11111
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
> 客服驳回
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"code":500,
|
|
|
"message":"error",
|
|
|
"data":{
|
|
|
"id":1, //id为前台退货id唯一主键
|
|
|
"returned_id":1, //returned_id为erp退货id唯一主键
|
|
|
"returned_status":91 //客服驳回
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
|
|
|
## 前台更新退货快递信息
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | order.updateChangeRefundOrderExpressInfo |
|
|
|
|
|
|
```json
|
|
|
{ "order_returned_id":1, //order_returned_id为前台退货id唯一主键
|
|
|
"apply_id":40, //apply_id为erp退货id唯一主键
|
|
|
"express_number":"603596395359",
|
|
|
"express_name":"顺丰",
|
|
|
"express_id":"23",
|
|
|
"type":"refund" // 表示类型为退货
|
|
|
}
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
## ERP更新退货单状态
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | erp.updateChangeRefundOrderStatus |
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"id":1, // id 为erp系统退货单id唯一主键
|
|
|
"status":40, // 0:提交、10:审核通过、20:商品寄回、30:已入库、40:付款结束、91:客服拒退
|
|
|
"type":"refund", // change:表示换货类型、refund:表示退货类型
|
|
|
"real_returned_amount":100,
|
|
|
"is_return_coupon":"N",
|
|
|
"return_yoho_coin":11111
|
|
|
}
|
|
|
|
|
|
```
|
|
|
## 取消退换货
|
|
|
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | order.changeRefundCancel |
|
|
|
|
|
|
```json
|
|
|
{"id": 428013, //erp的退货主键, 或者换货主键 ,根据type传不同的值
|
|
|
"status":900, //表示用户主动取消状态
|
|
|
"type":1 //1表示退货,2表示换货
|
|
|
}
|
|
|
|
|
|
```
|
|
|
## 修改订单支付方式(在线支付转货到付款)
|
|
|
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | order.paymentTypeUpdate |
|
|
|
|
|
|
```json
|
|
|
{ "order_code":160111703,"uid":20005848,"payment_type":2}
|
|
|
|
|
|
```
|
|
|
|
|
|
## 客服创建退货单同步给前台
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | erp.syncRefundOrder |
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"erp_refund_id":123,//ERP退货申请id
|
|
|
"uid": "3342109",
|
|
|
"order_code": "308545172",
|
|
|
"return_amount_mode": "2",
|
|
|
"alipay_account": "13912008849",
|
|
|
"alipay_name": "xxxx",
|
|
|
"bank_card": "6228480605428963215",
|
|
|
"bank_name": "中国农业银行",
|
|
|
"payee_name": "张璐",
|
|
|
"remark": "尺寸不合适",
|
|
|
"status":10, //可选值:0,提交;10,已审核。
|
|
|
"real_returned_amount":100,
|
|
|
"is_return_coupon":"N",
|
|
|
"return_yoho_coin":11111,
|
|
|
"app_type":0, //0,YOHO;1,BLK
|
|
|
"returned_goods_list": [
|
|
|
{
|
|
|
"product_skn":"51164694",
|
|
|
"product_skc":"292788",
|
|
|
"product_sku": "383669",
|
|
|
"goods_type": "1",
|
|
|
"last_price": "334",
|
|
|
"returned_reason": "1",
|
|
|
"remark": "尺寸不合适",
|
|
|
"evidence_images": ""
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## 客服创建换货单同步给前台
|
|
|
### MQ消息数据结构
|
|
|
| | |
|
|
|
| :-- | :-- |
|
|
|
| exchanges | amq.topic |
|
|
|
| route key | erp.syncChangeOrder |
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"exchange_id":123, //ERP换货申请ID
|
|
|
"exchange_refund_id":456, //换货申请的对应的退换单ID
|
|
|
"exchange_order_code":309558191, //换货订单
|
|
|
"uid":"8041520",
|
|
|
"order_code":"160177031", //原订单
|
|
|
"area_code":"150202",
|
|
|
"consignee_name":"测试三测试",
|
|
|
"address":"这里是详细地里是详细地",
|
|
|
"mobile":"18260001111",
|
|
|
"zip_code":"334455",
|
|
|
"delivery_type":"10",
|
|
|
"receipt_time":"1",
|
|
|
"remark": "尺寸不合适",
|
|
|
"status":10, //可选值:0,提交;10,已审核。
|
|
|
"app_type":0, //0,YOHO;1,BLK
|
|
|
"goods":[{
|
|
|
"product_skn":"51164694",
|
|
|
"product_skc":"292788",
|
|
|
"product_sku":"926307",
|
|
|
"goods_type":"1", //1、正常商品; 2、赠品; 3、加价购; 4、outlet
|
|
|
"exchange_reason":"11", //类型是4,6,8时需要传remark和evidence_images,图片为相对地址
|
|
|
"source_product_skc":"376673",
|
|
|
"source_product_sku":"926306",
|
|
|
"last_price":"149.00",
|
|
|
"remark":"尺寸不合适"
|
|
|
"evidence_images":""
|
|
|
}]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## 前台分配订单号
|
|
|
ERP可调用此方法从前台分配订单号(/erp/order/getAndOccupyOrderCode)
|
|
|
|
|
|
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|
|
|
|:-------| -----:|-----:|-----:|-----:|----:|
|
|
|
|uid|int|否|||用户ID|
|
|
|
|
|
|
请求示例
|
|
|
http://dev-service.yohops.com:9999/erp/order/getAndOccupyOrderCode?uid=8050370
|
|
|
|
|
|
####响应
|
|
|
|
|
|
code为200即为成功,否则是失败。
|
|
|
响应JSON格式如下所示:
|
|
|
```
|
|
|
{
|
|
|
"alg": "SALT_MD5"
|
|
|
"code": 200
|
|
|
"data": {
|
|
|
"newOrderCode": 160102044
|
|
|
}
|
|
|
"md5": "42dfc10820a38501f231840b3559d0b1"
|
|
|
"message": "操作成功"
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |