1
This commit is contained in:
@@ -34,11 +34,9 @@ func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order *
|
|||||||
courierVendorIDMap := jxutils.IntList2Map(courierVendorIDs)
|
courierVendorIDMap := jxutils.IntList2Map(courierVendorIDs)
|
||||||
excludeCourierVendorIDMap := jxutils.IntList2Map(excludeCourierVendorIDs)
|
excludeCourierVendorIDMap := jxutils.IntList2Map(excludeCourierVendorIDs)
|
||||||
errList := errlist.New()
|
errList := errlist.New()
|
||||||
globals.SugarLogger.Debugf("===excludeCourierVendorIDMap===========:%s", utils.Format4Output(excludeCourierVendorIDMap, false))
|
|
||||||
|
|
||||||
store, _ := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
store, _ := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
||||||
for _, storeCourier := range storeCourierList {
|
for _, storeCourier := range storeCourierList {
|
||||||
globals.SugarLogger.Debugf("===excludeCourierVendorIDMap===========:%s", utils.Format4Output(excludeCourierVendorIDMap[storeCourier.VendorID], false))
|
|
||||||
switch storeCourier.Status {
|
switch storeCourier.Status {
|
||||||
case model.YES:
|
case model.YES:
|
||||||
if (courierVendorIDs == nil || courierVendorIDMap[storeCourier.VendorID] == 1) &&
|
if (courierVendorIDs == nil || courierVendorIDMap[storeCourier.VendorID] == 1) &&
|
||||||
|
|||||||
@@ -243,14 +243,14 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BatchInitSkuMT2MT 批量创建商品
|
// BatchInitSkuMT2MT 批量创建商品
|
||||||
func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mtwmapi.API, vendorStoreID string, i int) error {
|
func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mtwmapi.API, vendorStoreID string, offset int) error {
|
||||||
foodDataList := make([]map[string]interface{}, len(fromSku))
|
foodDataList := make([]map[string]interface{}, len(fromSku))
|
||||||
for _, storeSku := range fromSku {
|
for k, storeSku := range fromSku {
|
||||||
foodData := make(map[string]interface{})
|
foodData := make(map[string]interface{})
|
||||||
if storeSku.AppFoodCode != "" {
|
if storeSku.AppFoodCode != "" {
|
||||||
foodData[mtwmapi.KeyAppFoodCode] = storeSku.AppFoodCode
|
foodData[mtwmapi.KeyAppFoodCode] = storeSku.AppFoodCode
|
||||||
} else {
|
} else {
|
||||||
foodData[mtwmapi.KeyAppFoodCode] = time.Now().UnixNano() + int64(i*3)
|
foodData[mtwmapi.KeyAppFoodCode] = time.Now().UnixNano() + int64(k*3)
|
||||||
}
|
}
|
||||||
|
|
||||||
skus := make([]interface{}, 0)
|
skus := make([]interface{}, 0)
|
||||||
@@ -299,7 +299,7 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi
|
|||||||
foodData["upc"] = "no_upc"
|
foodData["upc"] = "no_upc"
|
||||||
}
|
}
|
||||||
|
|
||||||
foodDataList[i] = foodData
|
foodDataList[k] = foodData
|
||||||
}
|
}
|
||||||
|
|
||||||
count := len(foodDataList) / 10
|
count := len(foodDataList) / 10
|
||||||
|
|||||||
Reference in New Issue
Block a user