This commit is contained in:
邹宗楠
2021-12-14 10:20:54 +08:00
parent 0250abce53
commit 53d2b60f0e

View File

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