修改饿百骑手信息
This commit is contained in:
@@ -158,5 +158,36 @@ func (p *PurchaseHandler) GetVendorCategories(ctx *jxcontext.Context) (vendorCat
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) GetOrderRider(vendorOrgCode, vendorStoreID string, param map[string]interface{}) (err error) {
|
||||
return api.EbaiAPI.OrderselfDeliveryStateSync(param["order_id"].(string), param["courier_phone"].(string))
|
||||
selfStatus := 0
|
||||
switch param["logistics_status"].(int) {
|
||||
case 0:
|
||||
selfStatus = 2 // 2:配送待分配
|
||||
case 12:
|
||||
selfStatus = 3 // 骑士接单
|
||||
case 15:
|
||||
selfStatus = 8 // 骑士到店
|
||||
case 20:
|
||||
selfStatus = 20 // 骑手送出
|
||||
case 40:
|
||||
selfStatus = 30 // 配送完成
|
||||
default:
|
||||
selfStatus = 7 // 配送异常
|
||||
}
|
||||
param2 := &ebaiapi.PushRiderInfo{
|
||||
DistributorId: 201,
|
||||
OrderId: param["order_id"].(string),
|
||||
State: 21,
|
||||
SelfStatus: selfStatus,
|
||||
SelfStatusDesc: param["logistics_context"].(string),
|
||||
DistributorInfoDTO: ebaiapi.DistributorInfoDTO{
|
||||
DistributorTypeId: "99999",
|
||||
DistributorName: "商家自行配送",
|
||||
},
|
||||
Knight: ebaiapi.Knight{
|
||||
Id: param["order_id"].(int64),
|
||||
Name: param["courier_name"].(string),
|
||||
Phone: param["courier_phone"].(string),
|
||||
},
|
||||
}
|
||||
return api.EbaiAPI.OrderselfDeliveryStateSync2(param2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user