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