- ebai the format of order_id of some different msgs are different.

This commit is contained in:
gazebo
2018-10-15 10:59:12 +08:00
parent cb86fe8a29
commit fa42da1f25
3 changed files with 13 additions and 5 deletions

View File

@@ -169,11 +169,12 @@ func (c *PurchaseHandler) onOrderNew(msg *ebaiapi.CallbackMsg) (response *ebaiap
func (c *PurchaseHandler) callbackMsg2Status(msg *ebaiapi.CallbackMsg) *model.OrderStatus {
body := msg.Body
vendorStatus := utils.Int64ToStr(utils.MustInterface2Int64(body["status"]))
orderID := utils.Int64ToStr(utils.MustInterface2Int64(msg.Body["order_id"]))
orderStatus := &model.OrderStatus{
VendorOrderID: body["order_id"].(string),
VendorOrderID: orderID,
VendorID: model.VendorIDEBAI,
OrderType: model.OrderTypeOrder,
RefVendorOrderID: body["order_id"].(string),
RefVendorOrderID: orderID,
RefVendorID: model.VendorIDEBAI,
VendorStatus: vendorStatus,
Status: c.GetStatusFromVendorStatus(vendorStatus),