Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
search_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fded7bcc
authored
Jun 23, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
818d2023
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
service/attr_service.go
service/attr_service.go
View file @
fded7bcc
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment