Commit fded7bcc by mushishixian

fix

parent 818d2023
Showing with 4 additions and 1 deletions
......@@ -61,6 +61,10 @@ func SearchAttr(attrOrigin, encap string) (goodsName string, err error) {
index := config.Get("es.attr_index").String()
result, err := es.CurlES(index, body)
goodsName = gjson.Get(result, "hits.hits.0._source.goods_name").String()
//匹配参数不成功,要变回原来的值
if goodsName == "" {
goodsName = attrOrigin
}
return
}
......@@ -116,7 +120,6 @@ func getNeedCheckUnit() (unitSlice []string) {
return
}
//将写法转成正规写法,转换单位,比如有的人喜欢将Ω输成欧姆或者O,所以要统一转成正常的Ω
func changeKeyword(attr string) (result string) {
regulars := common.KeywordRegular
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment