Commit b0f270d1 by 杨树贤

fix

parent f6f91ad9
Showing with 3 additions and 8 deletions
...@@ -319,13 +319,11 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku { ...@@ -319,13 +319,11 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
//这里要获取一个第一个阶梯的未税成本价 //这里要获取一个第一个阶梯的未税成本价
// L0003270 这个供应商的话,两种情况都会有 // L0003270 这个供应商的话,两种情况都会有
var costNoTax float64 var costNoTax float64
if sku.Canal == "L0018319" || sku.Canal == "L0003270" { if sku.Canal == "L0018319" {
for index, price := range sku.OriginalPrice { for index, price := range sku.OriginalPrice {
if index == 0 { if index == 0 {
costNoTax = price.PriceCn costNoTax = price.PriceCn
if costNoTax == 0 {
continue
}
} }
originalPrice = append(originalPrice, model.OriginPrice{ originalPrice = append(originalPrice, model.OriginPrice{
Purchases: price.Purchases, Purchases: price.Purchases,
...@@ -338,7 +336,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku { ...@@ -338,7 +336,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
} }
} }
if sku.Canal == "L0018562" || sku.Canal == "L0003270" { if sku.Canal == "L0018562" {
redisCon := gredis.Conn("default_r") redisCon := gredis.Conn("default_r")
defer redisCon.Close() defer redisCon.Close()
usdRatio, _ := redis.Float64(redisCon.Do("HGET", "erp_rate", 2)) usdRatio, _ := redis.Float64(redisCon.Do("HGET", "erp_rate", 2))
...@@ -346,9 +344,6 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku { ...@@ -346,9 +344,6 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
priceCnNoTax := c.MulFloat(price.PriceUs, usdRatio) priceCnNoTax := c.MulFloat(price.PriceUs, usdRatio)
if index == 0 { if index == 0 {
costNoTax = priceCnNoTax costNoTax = priceCnNoTax
if costNoTax == 0 {
continue
}
} }
originalPrice = append(originalPrice, model.OriginPrice{ originalPrice = append(originalPrice, model.OriginPrice{
Purchases: price.Purchases, Purchases: price.Purchases,
......
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