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