调用mtwmapi.RetailSkuSellStatus的地方替换为RetailSellStatus
This commit is contained in:
@@ -258,13 +258,15 @@ func getRefundSkuDetailList(msg *mtwmapi.CallbackMsg) (skuList []*mtwmapi.Refund
|
||||
}
|
||||
|
||||
func getSkuWeight(product map[string]interface{}) (weight int) {
|
||||
searchResult := specPat.FindStringSubmatch(product["spec"].(string))
|
||||
if len(searchResult) == 3 {
|
||||
weight = jxutils.FormatSkuWeight(float32(utils.Str2Float64WithDefault(searchResult[1], 0)), utils.TrimBlankChar(searchResult[2]))
|
||||
}
|
||||
if weight == 0 {
|
||||
_, _, _, specUnit, _, specQuality := jxutils.SplitSkuName(product["food_name"].(string))
|
||||
weight = jxutils.FormatSkuWeight(specQuality, specUnit)
|
||||
if weight = int(utils.Interface2Int64WithDefault(product["weight"], 0)); weight == 0 {
|
||||
searchResult := specPat.FindStringSubmatch(product["spec"].(string))
|
||||
if len(searchResult) == 3 {
|
||||
weight = jxutils.FormatSkuWeight(float32(utils.Str2Float64WithDefault(searchResult[1], 0)), utils.TrimBlankChar(searchResult[2]))
|
||||
}
|
||||
if weight == 0 {
|
||||
_, _, _, specUnit, _, specQuality := jxutils.SplitSkuName(product["food_name"].(string))
|
||||
weight = jxutils.FormatSkuWeight(specQuality, specUnit)
|
||||
}
|
||||
}
|
||||
return weight
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user