- don't check weixin exist after login in.
This commit is contained in:
@@ -99,3 +99,11 @@ func IntMap2List(intMap map[int]int) []int {
|
||||
}
|
||||
return retVal
|
||||
}
|
||||
|
||||
// 计算SKU价格,unitPrice为一斤的单价,specQuality为质量,单位为克
|
||||
func CaculateSkuPrice(unitPrice int, specQuality float32, specUnit string) int {
|
||||
if strings.ToLower(specUnit) == "kg" {
|
||||
specQuality *= 1000
|
||||
}
|
||||
return int(math.Round(float64(float32(unitPrice) * specQuality / 500)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user