This commit is contained in:
邹宗楠
2021-12-14 10:29:05 +08:00
parent 53d2b60f0e
commit e5446f170f

View File

@@ -254,22 +254,22 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, v
var (
vendorSkuID int64
isExd bool = false
customSkuID string
customSkuID int64
)
if strings.Contains(storeSku.StoreName, model.ExdStoreName) {
isExd = true
if storeSku.ExdSkuID == "" {
customSkuID = "0"
customSkuID = 0
} else {
customSkuID = "storeSku.ExdSkuID"
customSkuID = utils.Str2Int64(storeSku.ExdSkuID)
}
} else {
isExd = false
customSkuID = "storeSku.SkuID"
customSkuID = int64(storeSku.SkuID)
}
params := genSkuParamsFromStoreSkuInfo2(storeSku, true, isExd)
if globals.EnableEbaiStoreWrite {
strStoreID := "storeID"
strStoreID := utils.Int2Str(storeID)
if vendorSkuID, err = api.EbaiAPI.SkuCreate(ctx.GetTrackInfo(), strStoreID, customSkuID, params); err == nil && !isExd {
utils.AfterFuncWithRecover(5*time.Second, func() {
api.EbaiAPI.SkuShopCategoryMap(strStoreID, vendorSkuID, "", utils.Str2Int64(storeSku.VendorCatID), genSkuCatRank(storeSku))