Commit 5bab8b4d by mushishixian

rs价格

parent be38dbb1
Showing with 1 additions and 7 deletions
package service package service
import ( import (
"fmt"
"go_sku_server/model" "go_sku_server/model"
c "go_sku_server/pkg/common" c "go_sku_server/pkg/common"
"go_sku_server/pkg/gredis" "go_sku_server/pkg/gredis"
...@@ -235,22 +234,17 @@ func getMouserActivityPrice(sku model.LySku) model.LySku { ...@@ -235,22 +234,17 @@ func getMouserActivityPrice(sku model.LySku) model.LySku {
func (ls *LyService) TransformSpecialSupplierPrice(supplierId int64, priceUs float64, usRatio float64) float64 { func (ls *LyService) TransformSpecialSupplierPrice(supplierId int64, priceUs float64, usRatio float64) float64 {
switch supplierId { switch supplierId {
case 6: case 6:
fmt.Println("特殊处理,原始美金价为 : ", priceUs)
customRate := 7.85 //港币转美金 customRate := 7.85 //港币转美金
priceUs = c.MyRound(c.DivFloat(priceUs, customRate), 4) priceUs = c.MyRound(c.DivFloat(priceUs, customRate), 4)
fmt.Println("特殊处理后的美金价为 : ", priceUs)
break break
case 21: case 21:
fmt.Println("特殊处理,原始美金价为 : ", priceUs)
customRate := usRatio //人民币转美金 customRate := usRatio //人民币转美金
priceUs = c.MyRound(c.DivFloat(priceUs, customRate), 4) priceUs = c.MyRound(c.DivFloat(priceUs, customRate), 4)
fmt.Println("特殊处理后的美金价为 : ", priceUs) priceUs = c.MyRound(c.DivFloat(priceUs, 1.13), 4)
break break
case 1676: case 1676:
fmt.Println("特殊处理,原始美金价为 : ", priceUs)
customRate := 0.93 //欧元转美金 customRate := 0.93 //欧元转美金
priceUs = c.MyRound(c.DivFloat(priceUs, customRate), 4) priceUs = c.MyRound(c.DivFloat(priceUs, customRate), 4)
fmt.Println("特殊处理后的美金价为 : ", priceUs)
break break
} }
return priceUs return priceUs
......
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