From 3c6fe84d2f541a7e36e2a8cbae6f93b99a9a543d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 16 Oct 2020 17:29:37 +0800 Subject: [PATCH] a --- business/jxstore/cms/sync.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index db3b86369..eac0cf633 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -650,9 +650,17 @@ func (v *VendorSync) AmendAndPruneStoreStuff(ctx *jxcontext.Context, vendorIDs [ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, parentTask tasksch.ITask, db *dao.DaoDB, taskName string, isAsync, isManageIt bool, vendorIDs []int, storeIDs []int, mustDirty bool, handler tasksch.WorkFunc, isContinueWhenError bool) (task tasksch.ITask, hint string, err error) { var storeMapList []*model.StoreMap - if storeMapList, err = dao.GetStoresMapList2(db, vendorIDs, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncYes, "", "", mustDirty); err != nil { + var storeMapList2 []*model.StoreMap + if storeMapList2, err = dao.GetStoresMapList2(db, vendorIDs, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncYes, "", "", mustDirty); err != nil { return nil, "", err } + if len(storeIDs) == 1 { + storeMapList = storeMapList2 + } else { + // for _, v := range storeMapList2 { + // storeList, _ := dao.GetStoreList(db, []int{v.StoreID}, nil, nil, nil, "") + // } + } if len(storeMapList) == 0 { return nil, "", nil }