This commit is contained in:
邹宗楠
2022-10-10 16:29:28 +08:00
parent e57ab205de
commit 071114f8e3
5 changed files with 57 additions and 21 deletions

View File

@@ -270,6 +270,12 @@ func storeSkuSyncInfo2Bare(inSku *dao.StoreSkuSyncInfo) (outSku *partner.StoreSk
if !isStoreSkuSyncNeedDelete(inSku) {
outSku.Stock = model.MaxStoreSkuStockQty
}
if inSku.VendorMainId != "" {
outSku.VendorMainId = inSku.VendorMainId
}
if inSku.VendorSkuAttrId != "" {
outSku.VendorSkuAttrId = inSku.VendorSkuAttrId
}
return outSku
}
@@ -364,6 +370,12 @@ func sku2Update(vendorID int, sku *dao.StoreSkuSyncInfo, syncStatus int8) (item
if sku.VendorPrice > 0 {
kvs[dao.GetVendorPriceStructField(model.VendorNames[vendorID])] = sku.VendorPrice
}
if sku.VendorMainId != "" {
kvs["vendor_main_id"] = sku.VendorMainId
}
if sku.VendorSkuAttrId != "" {
kvs["vendor_sku_attr_id"] = sku.VendorSkuAttrId
}
storeSku := &model.StoreSkuBind{}
storeSku.ID = sku.BindID
item = &dao.KVUpdateItem{