报错优化
This commit is contained in:
@@ -34,7 +34,7 @@ func OnFinancialMsg(msg *ebaiapi.CallbackMsg) (err error) {
|
||||
}
|
||||
}
|
||||
} else if msg.Cmd == ebaiapi.CmdOrderDeliveryStatus { // 转自送调整
|
||||
if msg.Body["status"].(string) == ebaiapi.WaybillStatusSelfDelivery {
|
||||
if utils.Int64ToStr(utils.MustInterface2Int64(msg.Body["status"])) == ebaiapi.WaybillStatusSelfDelivery {
|
||||
vendorOrderID := GetOrderIDFromMsg(msg)
|
||||
orderMap, err := api.EbaiAPI.OrderGet(vendorOrderID)
|
||||
if err == nil {
|
||||
@@ -183,6 +183,7 @@ func (p *PurchaseHandler) OrderDetail2Financial(result map[string]interface{}) (
|
||||
globals.SugarLogger.Warnf("ebai OrderDetail2Financial, orderID:%s is not found from partner.CurOrderManager.LoadOrder", orderFinancial.VendorOrderID)
|
||||
err = nil
|
||||
}
|
||||
shop := result["shop"].(map[string]interface{})
|
||||
if result["products"] != nil {
|
||||
products := result["products"].([]interface{})
|
||||
for _, x := range products {
|
||||
@@ -194,7 +195,7 @@ func (p *PurchaseHandler) OrderDetail2Financial(result map[string]interface{}) (
|
||||
VendorOrderID2: orderFinancial.VendorOrderID2,
|
||||
// OrderFinancialID: orderFinancial.VendorOrderID,
|
||||
// ConfirmTime: getTimeFromInterface(order1["create_time"]),
|
||||
VendorStoreID: result["app_poi_code"].(string),
|
||||
VendorStoreID: utils.Interface2String(shop["baidu_shop_id"]),
|
||||
StoreID: storeID,
|
||||
JxStoreID: jxStoreID,
|
||||
VendorSkuID: utils.Interface2String(product["baidu_product_id"]),
|
||||
|
||||
@@ -130,7 +130,7 @@ func (p *PurchaseHandler) OrderDetail2Financial(orderData map[string]interface{}
|
||||
VendorOrderID: orderFinancial.VendorOrderID,
|
||||
// ActivityName: utils.Interface2String(xMap["discountName"]),
|
||||
// ActivityMoney: discountPrice,
|
||||
VendorActivityID: utils.Interface2String(orderShareRatioData["promotionId"]),
|
||||
VendorActivityID: utils.Interface2String(orderShareRatioData["promotionId"][0]),
|
||||
// Remark: utils.Interface2String(xMap["orderShareRatioData"]),
|
||||
}
|
||||
orderFinancial.Discounts = append(orderFinancial.Discounts, activity)
|
||||
|
||||
Reference in New Issue
Block a user