Commit 150e4f47 by 杨树贤

兼容老数据

parent 48b27d07
Showing with 2 additions and 2 deletions
......@@ -439,7 +439,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
for key, price := range sku.LadderPrice {
//MRO和Digikey是有人民币的代购
if sku.SupplierId == 1688 || sku.SupplierId == 7 {
if sku.SupplierId == 1688 || (sku.SupplierId == 7 && price.PriceCn > 0) {
originalPrice = append(originalPrice, model.OriginPrice{
PriceUs: price.PriceUs,
Purchases: price.Purchases,
......@@ -487,7 +487,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
//人民币成本价,mro只有人民币,所以人民币价格不是从美金来的,而且人民币是含税的.就它要特殊处理
//Digikey目前也有人民币
var priceCostCn float64
if sku.SupplierId == 1688 || sku.SupplierId == 7{
if sku.SupplierId == 1688 || (sku.SupplierId == 7 && price.PriceCn > 0) {
priceCostCn = c.MulFloat(price.PriceCn, 1)
} else {
//这里是去取实时美金汇率,并且计算人民币价格
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment