- fix calculate order shop price bug(multiple skuCount).

- map DeliveryStatusCourierCanceled to WaybillStatusAcceptCanceled for jd.
This commit is contained in:
gazebo
2018-08-23 15:38:03 +08:00
parent d4de5b4caf
commit 3f426746cf
2 changed files with 3 additions and 3 deletions

View File

@@ -208,7 +208,7 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db orm.O
if values, ok := skumapper[v.VendorSkuID]; ok {
v.JxSkuID = int(utils.Str2Int64(utils.Interface2String(values[1])))
v.ShopPrice = utils.Str2Int64WithDefault(utils.Interface2String(values[2]), 0)
order.ShopPrice += v.ShopPrice
order.ShopPrice += v.ShopPrice * int64(v.Count)
if v.ShopPrice == 0 {
globals.SugarLogger.Infof("updateOrderSkuOtherInfo [运营2]京东订单sku门店价格为零一般原因为没有门店价格信息orderID:%s, StoreID:%d, SkuID:%d, sku:%v", order.VendorOrderID, jxStoreID, v.JxSkuID, v)
}
@@ -219,7 +219,7 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db orm.O
if v.SkuID != 0 {
if values, ok := skumapper[utils.Int2Str(v.SkuID)]; ok {
v.ShopPrice = utils.Str2Int64WithDefault(utils.Interface2String(values[2]), 0)
order.ShopPrice += v.ShopPrice
order.ShopPrice += v.ShopPrice * int64(v.Count)
if v.ShopPrice == 0 {
globals.SugarLogger.Infof("updateOrderSkuOtherInfo [运营2]饿了么订单sku门店价格为零orderID:%s, StoreID:%d, SkuID:%d, sku:%v", order.VendorOrderID, jxStoreID, v.SkuID, v)
}

View File

@@ -31,7 +31,7 @@ func (c *PurchaseHandler) onWaybillMsg(msg *jdapi.CallbackDeliveryStatusMsg) (re
}
order.Status = model.WaybillStatusAccepted
case jdapi.DeliveryStatusCourierCanceled:
order.Status = model.WaybillStatusCanceled
order.Status = model.WaybillStatusAcceptCanceled
case jdapi.DeliveryStatusCourierArrived:
order.Status = model.WaybillStatusCourierArrived
case jdapi.DeliveryStatusGotGoods: