- fix calculate order shop price bug(multiple skuCount).
- map DeliveryStatusCourierCanceled to WaybillStatusAcceptCanceled for jd.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user