门店商品分类

This commit is contained in:
苏尹岚
2020-07-23 15:15:47 +08:00
parent 24e9b4f571
commit 29673dd992
12 changed files with 521 additions and 40 deletions

View File

@@ -78,7 +78,7 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
if len(catList) > 0 {
num += len(catList)
task := tasksch.NewParallelTask(fmt.Sprintf("%s SyncStoreCategory step2, level=%d", model.VendorChineseNames[vendorID], level),
tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError), ctx,
tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
updateFields := []string{dao.GetSyncStatusStructField(model.VendorNames[vendorID])}
idFieldName := dao.GetVendorThingIDStructField(model.VendorNames[vendorID])
@@ -91,6 +91,13 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
return nil, err
}
}
if vendorID != model.VendorIDJD && vendorID != model.VendorIDJDShop {
if catInfo.IsSysCat == model.YES && catInfo.StoreCatID != 0 {
catInfo.Name = catInfo.StoreCatName
catInfo.Seq = catInfo.StoreCatSeq
}
}
if model.IsSyncStatusDelete(catInfo.CatSyncStatus) { // 删除
if model.IsSyncStatusDelete(catInfo.CatSyncStatus) && !dao.IsVendorThingIDEmpty(catInfo.VendorCatID) {
err = handler.DeleteStoreCategory(ctx, storeID, vendorStoreID, catInfo.VendorCatID, level)