+FullSyncVendorStuff
This commit is contained in:
@@ -139,7 +139,7 @@ func (v *VendorSync) oldSyncCategory(ctx *jxcontext.Context, db *dao.DaoDB, cate
|
||||
globals.SugarLogger.Debug("SyncCategory")
|
||||
hint, err = v.LoopMultiStoresVendors(ctx, db, fmt.Sprintf("同步分类信息:%d", categoryID), isAsync, false,
|
||||
func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
vendorInfo := batchItemList[0].(*tMultiStoreVendorInfo)
|
||||
vendorInfo := batchItemList[0].(*MultiStoreVendorInfo)
|
||||
var cats []*model.SkuCategory
|
||||
cond := make(map[string]interface{})
|
||||
if categoryID > 0 {
|
||||
@@ -173,7 +173,7 @@ func (v *VendorSync) SyncReorderCategories(ctx *jxcontext.Context, db *dao.DaoDB
|
||||
|
||||
func (v *VendorSync) oldSyncReorderCategories(ctx *jxcontext.Context, db *dao.DaoDB, categoryID int, isAsync bool, userName string) (hint string, err error) {
|
||||
hint, err = v.LoopMultiStoresVendors(ctx, db, fmt.Sprintf("分类重排序:%d", categoryID), isAsync, false, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
vendorInfo := batchItemList[0].(*tMultiStoreVendorInfo)
|
||||
vendorInfo := batchItemList[0].(*MultiStoreVendorInfo)
|
||||
multiStoresHandler := v.GetMultiStoreHandler(vendorInfo.VendorID)
|
||||
err2 := multiStoresHandler.ReorderCategories(db, categoryID, userName)
|
||||
if err2 == nil {
|
||||
@@ -260,7 +260,7 @@ func (v *VendorSync) oldSyncSkus(ctx *jxcontext.Context, db *dao.DaoDB, nameIDs
|
||||
return v.LoopMultiStoresVendors(ctx, db, fmt.Sprintf("同步商品信息, nameIDs:%v, skuIDs:%v", nameIDs, skuIDs), isAsync, isManagedIt,
|
||||
func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
var resultList []interface{}
|
||||
vendorInfo := batchItemList[0].(*tMultiStoreVendorInfo)
|
||||
vendorInfo := batchItemList[0].(*MultiStoreVendorInfo)
|
||||
multiStoresHandler := v.GetMultiStoreHandler(vendorInfo.VendorID)
|
||||
syncStatusFieldName := dao.GetSyncStatusStructField(model.VendorNames[multiStoresHandler.GetVendorID()])
|
||||
dbField := dao.ConvertDBFieldPrefix(model.VendorNames[multiStoresHandler.GetVendorID()])
|
||||
|
||||
Reference in New Issue
Block a user