Commit 14c3bbef by mushishixian

fix

parents 1d2aef5b 2435485f
......@@ -14,16 +14,18 @@ type RecvPro struct {
}
func init() {
//queueExchange := rabbitmq.QueueExchange{
// "bom_match",
// "bom_match",
// "bom",
// "direct",
// "amqp://huntadmin:jy2y2900@192.168.1.237:5672/",
//}
//
//str := `{"bom_id":408,"delivery_type":1,"sort":2}`
//rabbitmq.Send(queueExchange, str)
if configs.ApiSetting.Mode == "debug" {
queueExchange := rabbitmq.QueueExchange{
"bom_match",
"bom_match",
"bom",
"direct",
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/",
}
str := `{"bom_id":408,"delivery_type":1,"sort":2}`
rabbitmq.Send(queueExchange, str)
}
}
func (t *RecvPro) Consumer(dataByte []byte) (err error) {
......
......@@ -232,7 +232,7 @@ func getQuery(attrs []string) (query *es.BoolQuery) {
nestedQuery = es.NewNestedQuery("attrs", subQuery)
query.Should(nestedQuery)
}
query.MinimumNumberShouldMatch(1)
query.MinimumNumberShouldMatch(2)
}
return query
......
......@@ -329,7 +329,9 @@ func getTermQuery(goodsName, brandName string, number int, flag bool) (query *es
}
//query = query.Filter(es.NewRangeQuery("single_price").Gt(0))
//query = query.Filter(es.NewRangeQuery("stock").Gt(0))
if configs.ApiSetting.Mode != "debug" {
query = query.Filter(es.NewTermQuery("status", 1))
}
//query = query.Filter(es.NewRangeQuery("single_price").Gt(0))
//src, err := query.Source()
//if err != nil {
......
......@@ -4,7 +4,7 @@ var KeywordRegular = map[string]string{
//`^(.* )?([\d\.]+)(欧|欧姆|R|r)( .*)?$`: `$1$2Ω$4`,
//`^(.* )?([\d\.]+)(U|u|μ)(.?)( .*)?$`: `$1$2Μ$4$5`,
"COG": "C0G",
"NPO": "NP0",
"NPO|NP0|nPO|npO|npo|nP0|np0": "C0G",
"华科|华新科技|华新科": "华新",
`(欧姆|欧|O|o|R|r)`: "Ω",
......
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