- 对于单门店平台,同步商品时,多个门店同时并发同步
This commit is contained in:
@@ -89,23 +89,24 @@ func (c *PurchaseHandler) getOrder(orderID string) (order *model.GoodsOrder, ord
|
||||
switch taskIndex {
|
||||
case 0:
|
||||
orderMap, err = api.JdAPI.QuerySingleOrder(orderID)
|
||||
if err == nil {
|
||||
order = c.Map2Order(orderMap)
|
||||
realMobile, err = api.JdAPI.GetRealMobile4Order(orderID, order.VendorStoreID)
|
||||
if realMobile != "" {
|
||||
order.ConsigneeMobile2 = jxutils.FormalizeMobile(realMobile)
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
realMobile, err = api.JdAPI.GetRealMobile4Order(orderID, order.VendorStoreID)
|
||||
case 2:
|
||||
orderSettlement, err = api.JdAPI.OrderShoudSettlementService2(orderID)
|
||||
}
|
||||
return nil, err
|
||||
}, []int{0, 1, 2})
|
||||
}, []int{0, 1})
|
||||
task.Run()
|
||||
task.GetResult(0)
|
||||
if orderMap != nil {
|
||||
order = c.Map2Order(orderMap)
|
||||
if order != nil {
|
||||
if orderSettlement != nil {
|
||||
order.TotalShopMoney = orderSettlement.SettlementAmount + orderSettlement.PlatOrderGoodsDiscountMoney
|
||||
}
|
||||
if realMobile != "" {
|
||||
order.ConsigneeMobile2 = jxutils.FormalizeMobile(realMobile)
|
||||
}
|
||||
}
|
||||
// if orderMap, err = api.JdAPI.QuerySingleOrder(orderID); err == nil {
|
||||
// globals.SugarLogger.Debugf("jd getOrder2 orderID:%s", orderID)
|
||||
|
||||
Reference in New Issue
Block a user