yb plucode
This commit is contained in:
@@ -27,11 +27,13 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, v
|
||||
if globals.EnableYbStoreWrite {
|
||||
storeSku := storeSkuList[0]
|
||||
buildYbConfigs(storeID)
|
||||
buildYbApiCookie(ctx)
|
||||
result, err := api.YinBaoAPI.AddProductInfo(buildProductInfoParam(storeSku))
|
||||
if err != nil {
|
||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDYB], "创建商品")
|
||||
} else {
|
||||
storeSku.VendorSkuID = utils.Int64ToStr(result.UID)
|
||||
updateYbSkuPluCode(vendorStoreID, storeSku.YbBarCode)
|
||||
}
|
||||
}
|
||||
return failedList, err
|
||||
@@ -368,3 +370,8 @@ func convertVendorCatList(remoteCats []*yinbaoapi.LoadCategorysWithOptionResult)
|
||||
}
|
||||
return cats
|
||||
}
|
||||
|
||||
func updateYbSkuPluCode(vendorStoreID, ybBarCode string) (err error) {
|
||||
err = api.YinBaoAPI.SaveProduct(vendorStoreID, ybBarCode)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user