From 5f447c56f19fca8fbbee9b68c6c68bce56e6cb3a Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 2 Nov 2022 18:30:31 +0800 Subject: [PATCH] sync --- business/jxstore/cms/store.go | 1 + business/jxstore/cms/sync.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 486ce15d2..d6b0e167b 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1777,6 +1777,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor if isStoreMapNeedSync(vendorID, valid) { globals.SugarLogger.Debugf("1.isStoreMapNeedSync(vendorID, valid)=================%v", isStoreMapNeedSync(vendorID, valid)) _, err = CurVendorSync.SyncStore(ctx, db, vendorID, storeID, false, userName) + globals.SugarLogger.Debug("CurVendorSync.SyncStore:err======%v", err) } } } diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index 1f25e8dfe..4779023ee 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -231,6 +231,7 @@ func (v *VendorSync) SyncReorderCategories(ctx *jxcontext.Context, db *dao.DaoDB // } func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs, storeIDs []int, mustDirty, isAsync bool) (hint string, err error) { + globals.SugarLogger.Debug("进入SyncStore2了") userName := ctx.GetUserName() isManageIt := len(storeIDs) == 0 || len(storeIDs) > 5 _, hint, err = v.LoopStoresMap2(ctx, nil, db, fmt.Sprintf("同步门店信息:%v", storeIDs), isAsync, isManageIt, vendorIDs, storeIDs, mustDirty, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (resultList interface{}, err error) { @@ -273,10 +274,12 @@ func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs } if err == nil { if model.IsSyncStatusNew(storeMap.SyncStatus) { + globals.SugarLogger.Debug("进入 model.IsSyncStatusNew(storeMap.SyncStatus)") storeMap.VendorStoreID = vendorStoreID storeMap.SyncStatus = 0 _, err = dao.UpdateEntity(db, storeMap, "VendorStoreID", model.FieldSyncStatus) } else { + globals.SugarLogger.Debug("进入 model.IsSyncStatusNew(storeMap.SyncStatus) else") storeMap.SyncStatus = 0 _, err = dao.UpdateEntity(db, storeMap, model.FieldSyncStatus) } @@ -316,6 +319,7 @@ func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs if err == nil { resultList = []interface{}{1} if model.IsSyncStatusNew(storeMap.SyncStatus) { + globals.SugarLogger.Debug("sahsh进入model.IsSyncStatusNew(storeMap.SyncStatus)") storeMap.VendorStoreID = vendorStoreID storeMap.SyncStatus = 0 _, err = dao.UpdateEntity(db, storeMap, "VendorStoreID", model.FieldSyncStatus)