银豹修改价格尝试

This commit is contained in:
苏尹岚
2020-03-27 15:04:01 +08:00
parent c539a57c79
commit 46aab83aa6
3 changed files with 4 additions and 5 deletions

View File

@@ -528,10 +528,9 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
priceList = priceList[:] priceList = priceList[:]
priceList = rList2 priceList = rList2
for _, v := range priceList { for _, v := range priceList {
price, _ := GetSkuNamePrice(db, v.SkuID, int64(v.Price)) price, _ := GetSkuNamePrice(db, v.SkuID, int64(v.JxPrice))
v.Price = int(price) v.JxPrice = int(price)
} }
fmt.Println(utils.Format4Output(priceList, false))
} }
} }
task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx, task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx,

View File

@@ -49,7 +49,7 @@ type StoreSkuInfo struct {
ActPrice int64 `json:"actPrice,omitempty"` ActPrice int64 `json:"actPrice,omitempty"`
VendorActID string `json:"vendorActID,omitempty"` VendorActID string `json:"vendorActID,omitempty"`
IsSpecialty int `json:"isSpecialty,omitempty"` IsSpecialty int `json:"isSpecialty,omitempty"`
Price int `json:"jxPrice,omitempty"` JxPrice int `json:"jxPrice,omitempty"`
} }
type StoreSkuInfoWithErr struct { type StoreSkuInfoWithErr struct {

View File

@@ -138,7 +138,7 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg
var productInfo = &yinbaoapi.ProductInfo{ var productInfo = &yinbaoapi.ProductInfo{
UID: utils.Str2Int64(v.VendorSkuID), UID: utils.Str2Int64(v.VendorSkuID),
SellPrice: utils.Float64ToPointer(jxutils.IntPrice2Standard(v.VendorPrice)), SellPrice: utils.Float64ToPointer(jxutils.IntPrice2Standard(v.VendorPrice)),
BuyPrice: utils.Float64ToPointer(jxutils.IntPrice2Standard(int64(v.Price))), BuyPrice: utils.Float64ToPointer(jxutils.IntPrice2Standard(int64(v.JxPrice))),
} }
err = api.YinBaoAPI.UpdateProductInfo(productInfo) err = api.YinBaoAPI.UpdateProductInfo(productInfo)
if err != nil { if err != nil {