This commit is contained in:
邹宗楠
2024-01-12 10:52:15 +08:00
parent 362903a76a
commit 8ba5b55bf4

View File

@@ -231,13 +231,13 @@ 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.Debugf("==============storeMap %s , %s", utils.Format4Output(vendorIDs, false), utils.Format4Output(storeIDs, false))
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) {
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
var failedList []*partner.StoreSkuInfoWithErr
handler := v.GetStoreHandler(loopMapInfo.VendorID)
globals.SugarLogger.Debugf("==============handler %s , %s", utils.Format4Output(handler, false), utils.Format4Output(loopMapInfo.VendorID, false))
if handler != nil {
if len(loopMapInfo.StoreMapList) > 1 {
loopStoreTask := tasksch.NewParallelTask(fmt.Sprintf("处理平台%s", model.VendorChineseNames[loopMapInfo.VendorID]), tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
@@ -684,7 +684,6 @@ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, parentTask tasksch.I
if storeMapList, err = dao.GetStoresMapList2(db, vendorIDs, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncYes, "", "", "", mustDirty); err != nil {
return nil, "", err
}
globals.SugarLogger.Debugf("=========storeMapList := %s", utils.Format4Output(storeMapList, false))
if len(storeMapList) == 0 {
return nil, "", nil
}