This commit is contained in:
richboo111
2023-03-17 14:14:35 +08:00
parent 103b4dab34
commit 762fc0f70e
7 changed files with 304 additions and 3 deletions

View File

@@ -974,6 +974,19 @@ func TranslateSoundSize(vendorID, soundPercentage int) (soundSize string) {
if soundPercentage > 80 && soundPercentage <= 100 {
soundSize = "5"
}
} else if vendorID == model.VendorIDXpYun {
if soundPercentage == 0 {
soundSize = "3"
}
if soundPercentage > 0 && soundPercentage <= 33 {
soundSize = "2"
}
if soundPercentage > 33 && soundPercentage <= 66 {
soundSize = "1"
}
if soundPercentage > 66 && soundPercentage <= 100 {
soundSize = "0"
}
}
return soundSize
}