- call GetJxStoreIDFromOrder at first place

This commit is contained in:
gazebo
2018-10-28 13:36:42 +08:00
parent cfa09f94be
commit a188f48253
2 changed files with 5 additions and 4 deletions

View File

@@ -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()