- 新同步逻辑调整,京东还有问题
This commit is contained in:
@@ -138,7 +138,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID
|
||||
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||
skuPriceList := make([]string, len(storeSkuList))
|
||||
for k, v := range storeSkuList {
|
||||
skuPriceList[k] = fmt.Sprintf("%s:%d", v.VendorSkuID, v.Price)
|
||||
skuPriceList[k] = fmt.Sprintf("%s:%d", v.VendorSkuID, v.VendorPrice)
|
||||
}
|
||||
if globals.EnableEbaiStoreWrite {
|
||||
if len(skuPriceList) > 1 {
|
||||
@@ -167,7 +167,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, storeID i
|
||||
|
||||
func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo) (params map[string]interface{}) {
|
||||
params = map[string]interface{}{
|
||||
"name": storeSku.Name,
|
||||
"name": utils.LimitMixedStringLen(storeSku.SkuName, ebaiapi.MaxSkuNameByteCount),
|
||||
"left_num": model.MaxStoreSkuStockQty,
|
||||
"category_id": utils.Str2Int64(storeSku.VendorCatID),
|
||||
"predict_cat": 0, // 不使用推荐类目
|
||||
@@ -190,7 +190,7 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo) (params map[s
|
||||
params["market_price"] = storeSku.VendorPrice
|
||||
}
|
||||
if storeSku.StoreSkuSyncStatus&(model.SyncFlagSaleMask|model.SyncFlagNewMask) != 0 {
|
||||
params["status"] = jxSkuStatus2Ebai(storeSku.StoreSkuStatus)
|
||||
params["status"] = jxSkuStatus2Ebai(storeSku.MergedStatus)
|
||||
}
|
||||
// todo 饿百如果给的UPC是空要报错,但如果我要删除UPC怎么弄?
|
||||
// if storeSku.Upc != "" {
|
||||
@@ -275,9 +275,9 @@ func vendorSku2Jx(vendorSku *ebaiapi.SkuInfo) (skuName *partner.SkuNameInfo) {
|
||||
VendorSkuID: vendorSkuID,
|
||||
SkuID: skuID,
|
||||
|
||||
Stock: vendorSku.LeftNum,
|
||||
Price: vendorSku.SalePrice,
|
||||
Status: ebaiSkuStatus2Jx(vendorSku.Status),
|
||||
Stock: vendorSku.LeftNum,
|
||||
VendorPrice: vendorSku.SalePrice,
|
||||
Status: ebaiSkuStatus2Jx(vendorSku.Status),
|
||||
},
|
||||
SkuName: vendorSku.Name,
|
||||
Comment: comment,
|
||||
|
||||
Reference in New Issue
Block a user