diff --git a/pdd_union/goods.go b/pdd_union/goods.go index 5f15200..89cc538 100644 --- a/pdd_union/goods.go +++ b/pdd_union/goods.go @@ -36,7 +36,7 @@ func GetRecommendGoods(keyArr map[string]string, param map[string]interface{}) [ goodsSale = strings.ReplaceAll(goodsSale, "万+", "") goodsSale = zhios_third_party_utils.IntToStr(zhios_third_party_utils.StrToInt(goodsSale) * 10000) } - if strings.Contains(zhios_third_party_utils.AnyToString(tmp["goods_sales"]), "万") { + if strings.Contains(goodsSale, "万") { goodsSale = strings.ReplaceAll(goodsSale, "万", "") goodsSale = zhios_third_party_utils.IntToStr(zhios_third_party_utils.StrToInt(goodsSale) * 10000) } @@ -79,7 +79,7 @@ func GetSearchGoods(keyArr map[string]string, param map[string]interface{}) []ma goodsSale = strings.ReplaceAll(goodsSale, "万+", "") goodsSale = zhios_third_party_utils.IntToStr(zhios_third_party_utils.StrToInt(goodsSale) * 10000) } - if strings.Contains(zhios_third_party_utils.AnyToString(tmp["goods_sales"]), "万") { + if strings.Contains(goodsSale, "万") { goodsSale = strings.ReplaceAll(goodsSale, "万", "") goodsSale = zhios_third_party_utils.IntToStr(zhios_third_party_utils.StrToInt(goodsSale) * 10000) }