Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
bom_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
21c875c0
authored
Mar 15, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
c7409d2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
internal/logic/attr.go
internal/logic/search.go
internal/logic/attr.go
View file @
21c875c0
...
@@ -28,7 +28,7 @@ func GetStandardAttrs(bomItems []model.BomItem) []model.BomItem {
...
@@ -28,7 +28,7 @@ func GetStandardAttrs(bomItems []model.BomItem) []model.BomItem {
}
}
params
:=
req
.
BodyJSON
(
attrParams
)
params
:=
req
.
BodyJSON
(
attrParams
)
resp
,
err
:=
req
.
Post
(
configs
.
ApiSetting
.
Attrs
,
params
)
resp
,
err
:=
req
.
Post
(
configs
.
ApiSetting
.
Attrs
,
params
)
//
fmt.Println(resp)
fmt
.
Println
(
resp
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Println
(
err
)
fmt
.
Println
(
err
)
}
}
...
...
internal/logic/search.go
View file @
21c875c0
...
@@ -122,7 +122,7 @@ func getTermQuery(bomItem model.BomItem, sort int, flag bool) (query *es.BoolQue
...
@@ -122,7 +122,7 @@ func getTermQuery(bomItem model.BomItem, sort int, flag bool) (query *es.BoolQue
if
strings
.
Contains
(
attr
,
"ZLNZ€"
)
||
strings
.
Contains
(
attr
,
"OM€"
)
{
if
strings
.
Contains
(
attr
,
"ZLNZ€"
)
||
strings
.
Contains
(
attr
,
"OM€"
)
{
query
.
Should
(
es
.
NewTermQuery
(
"attr_bom"
,
attr
))
query
.
Should
(
es
.
NewTermQuery
(
"attr_bom"
,
attr
))
}
else
{
}
else
{
query
.
Should
(
es
.
NewTermQuery
(
"attr_bom"
,
attr
))
query
.
Must
(
es
.
NewTermQuery
(
"attr_bom"
,
attr
))
}
}
}
}
}
else
{
}
else
{
...
...
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