- fix callback response.

This commit is contained in:
gazebo
2018-09-27 18:44:22 +08:00
parent 392b6ad813
commit 919a342665
2 changed files with 6 additions and 6 deletions

View File

@@ -35,12 +35,12 @@ func (c *PurchaseHandler) onWaybillMsg(msg *ebaiapi.CallbackMsg) (retVal *ebaiap
order := c.callbackMsg2Waybill(msg)
if order.Status == model.WaybillStatusAccepted {
if result, err := api.EbaiAPI.OrderGet(order.VendorOrderID); err != nil {
return ebaiapi.Err2CallbackResponse(err, order.VendorOrderID)
return api.EbaiAPI.Err2CallbackResponse(msg.Cmd, err, order.VendorOrderID)
} else {
order.CourierMobile = utils.Interface2String(result["order"].(map[string]interface{})["delivery_phone"])
}
}
return ebaiapi.Err2CallbackResponse(partner.CurOrderManager.OnWaybillStatusChanged(order), order.VendorStatus)
return api.EbaiAPI.Err2CallbackResponse(msg.Cmd, partner.CurOrderManager.OnWaybillStatusChanged(order), order.VendorStatus)
}
func (c *PurchaseHandler) callbackMsg2Waybill(msg *ebaiapi.CallbackMsg) (retVal *model.Waybill) {
@@ -55,7 +55,7 @@ func (c *PurchaseHandler) callbackMsg2Waybill(msg *ebaiapi.CallbackMsg) (retVal
CourierName: "", // 饿百取不到骑手的名字
// CourierMobile: msg.Phone,
VendorStatus: vendorStatus,
StatusTime: utils.Timestamp2Time(msg.TimeStamp),
StatusTime: utils.Timestamp2Time(msg.Timestamp),
}
return retVal
}