This commit is contained in:
苏尹岚
2021-01-28 14:32:59 +08:00
parent a236f0b14c
commit 8418420928
2 changed files with 32 additions and 30 deletions

View File

@@ -1239,6 +1239,8 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
} }
//下面这段很难受 //下面这段很难受
{ {
//可售了的才整
if skuBind.Status == model.StoreSkuBindStatusNormal {
//如果是京东关注,要去建商品 //如果是京东关注,要去建商品
list1, _ := dao.GetStoresMapList(db, []int{model.VendorIDJD}, []int{storeID}, nil, model.StoreStatusAll, 1, "", "", "") list1, _ := dao.GetStoresMapList(db, []int{model.VendorIDJD}, []int{storeID}, nil, model.StoreStatusAll, 1, "", "", "")
//表示这个门店绑定了京东 //表示这个门店绑定了京东
@@ -1275,6 +1277,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
} }
} }
} }
}
} else { } else {
beforeMsg := *v beforeMsg := *v
skuBind = &v.StoreSkuBind skuBind = &v.StoreSkuBind

View File

@@ -139,7 +139,6 @@ func SyncSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs []int,
globals.SugarLogger.Debugf("SyncSkus vendorIDs:%v, appOrgCodes:%v, nameIDs:%v, skuIDs:%v", vendorIDs, appOrgCodes, nameIDs, skuIDs) globals.SugarLogger.Debugf("SyncSkus vendorIDs:%v, appOrgCodes:%v, nameIDs:%v, skuIDs:%v", vendorIDs, appOrgCodes, nameIDs, skuIDs)
db := dao.GetDB() db := dao.GetDB()
skuList, err := dao.GetSkusWithVendor(db, vendorIDs, appOrgCodes, nameIDs, skuIDs, true) skuList, err := dao.GetSkusWithVendor(db, vendorIDs, appOrgCodes, nameIDs, skuIDs, true)
fmt.Println("1111111111111111111111", utils.Format4Output(skuList, false))
if err == nil && len(skuList) > 0 { if err == nil && len(skuList) > 0 {
// todo 按vendorID orgCode合并操作 // todo 按vendorID orgCode合并操作
task := tasksch.NewParallelTask(fmt.Sprintf("同步商品:%v,%v", nameIDs, skuIDs), tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, task := tasksch.NewParallelTask(fmt.Sprintf("同步商品:%v,%v", nameIDs, skuIDs), tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,