- 修复GetPricePercentage的BUG

This commit is contained in:
gazebo
2019-07-18 11:54:05 +08:00
parent d0768e914b
commit c7736952b3
3 changed files with 6 additions and 6 deletions

View File

@@ -307,8 +307,8 @@ func (p *PurchaseHandler) syncStoreSkus(ctx *jxcontext.Context, parentTask tasks
err = fmt.Errorf("SKUNAME%d:%s没有图片同步失败", skuItem.NameID, skuItem.Name)
} else {
pricePercentage := jxutils.GetPricePercentage(storeDetail.PricePercentagePackObj, int(skuItem.UnitPrice), int(storeDetail.PricePercentage))
globals.SugarLogger.Debugf("skuID:%d, price:%d, pricePercentage:%d", skuItem.SkuID, skuItem.Price, pricePercentage)
globals.SugarLogger.Debugf(utils.Format4Output(storeDetail.PricePercentagePackObj, false))
// globals.SugarLogger.Debugf("skuID:%d, price:%d, pricePercentage:%d", skuItem.SkuID, skuItem.Price, pricePercentage)
// globals.SugarLogger.Debugf(utils.Format4Output(storeDetail.PricePercentagePackObj, false))
foodData["name"] = jxutils.ComposeSkuName(skuItem.Prefix, skuItem.Name, skuItem.Comment, skuItem.Unit, skuItem.SpecQuality, skuItem.SpecUnit, mtwmapi.MaxSkuNameCharCount)
foodData["description"] = skuItem.Comment
foodData["price"] = jxutils.IntPrice2Standard(int64(jxutils.CaculateSkuVendorPrice(int(skuItem.Price), pricePercentage, skuItem.CatPricePercentage)))