- call GetJxStoreIDFromOrder at first place
This commit is contained in:
@@ -71,15 +71,16 @@ func (c *BaseScheduler) PickupGoodsAndUpdateStatus(ctx *jxcontext.Context, vendo
|
||||
}
|
||||
|
||||
func getStoreDeliveryType(order *model.GoodsOrder) (deliveryType int) {
|
||||
jxStoreID := jxutils.GetJxStoreIDFromOrder(order)
|
||||
if globals.OrderUseNewTable {
|
||||
deliveryType = scheduler.StoreDeliveryTypeByPlatform // 缺省值
|
||||
if storeMap, _ := dao.GetStoreMapByStoreID(nil, jxutils.GetJxStoreIDFromOrder(order), order.VendorID); storeMap != nil {
|
||||
if storeMap, _ := dao.GetStoreMapByStoreID(nil, jxStoreID, order.VendorID); storeMap != nil {
|
||||
deliveryType = int(storeMap.DeliveryType)
|
||||
}
|
||||
return deliveryType
|
||||
}
|
||||
storefeature := &legacymodel2.Jxstorefeature{
|
||||
Id: jxutils.GetJxStoreIDFromOrder(order),
|
||||
Id: jxStoreID,
|
||||
}
|
||||
if storefeature.Id != 0 {
|
||||
db := orm.NewOrm()
|
||||
|
||||
@@ -101,8 +101,8 @@ func (s *WatchOrderInfo) SetOrder(order *model.GoodsOrder) (retVal *model.GoodsO
|
||||
|
||||
func (s *WatchOrderInfo) updateOrderStoreFeature(order *model.GoodsOrder) (err error) {
|
||||
globals.SugarLogger.Debugf("updateOrderStoreFeature orderID:%s", order.VendorOrderID)
|
||||
jxStoreID := jxutils.GetJxStoreIDFromOrder(order)
|
||||
if globals.OrderUseNewTable {
|
||||
jxStoreID := jxutils.GetJxStoreIDFromOrder(order)
|
||||
if jxStoreID > 0 {
|
||||
db := dao.GetDB()
|
||||
storeMap, err2 := dao.GetStoreMapByStoreID(db, jxStoreID, order.VendorID)
|
||||
@@ -134,7 +134,7 @@ func (s *WatchOrderInfo) updateOrderStoreFeature(order *model.GoodsOrder) (err e
|
||||
return err
|
||||
}
|
||||
storefeature := &legacymodel2.Jxstorefeature{
|
||||
Id: jxutils.GetJxStoreIDFromOrder(order),
|
||||
Id: jxStoreID,
|
||||
}
|
||||
if storefeature.Id > 0 {
|
||||
db := orm.NewOrm()
|
||||
|
||||
Reference in New Issue
Block a user