- model.WaybillStatusNeverSend

- try to set ebai sku weight
This commit is contained in:
gazebo
2018-11-27 10:27:32 +08:00
parent a3cddd891e
commit 4fbfcdb13e
6 changed files with 25 additions and 3 deletions

View File

@@ -196,3 +196,12 @@ func IsMobileFake(mobile string) bool {
func IsLegalStoreID(id int) bool {
return id >= 100000 && id < 200000
}
// 将规格转为重量
func FormatSkuWeight(specQuality float32, specUnit string) int {
lowerSpecUnit := strings.ToLower(specUnit)
if lowerSpecUnit == "kg" || lowerSpecUnit == "l" {
specQuality *= 1000
}
return int(specQuality)
}