- CaculateSkuPrice return UnitPrice when unit is 份
This commit is contained in:
@@ -114,7 +114,10 @@ func IntMap2List(intMap map[int]int) []int {
|
||||
}
|
||||
|
||||
// 计算SKU价格,unitPrice为一斤的单价,specQuality为质量,单位为克
|
||||
func CaculateSkuPrice(unitPrice int, specQuality float32, specUnit string) int {
|
||||
func CaculateSkuPrice(unitPrice int, specQuality float32, specUnit string, skuNameUnit string) int {
|
||||
if skuNameUnit == "份" {
|
||||
return unitPrice
|
||||
}
|
||||
if strings.ToLower(specUnit) == "kg" {
|
||||
specQuality *= 1000
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user