Commit b948df87 by mushishixian

debug code

parent e8b084d6
Showing with 14 additions and 10 deletions
......@@ -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/",
}
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)
str := `{"bom_id":408,"delivery_type":1,"sort":2}`
rabbitmq.Send(queueExchange, str)
}
}
func (t *RecvPro) Consumer(dataByte []byte) (err error) {
......
......@@ -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))
query = query.Filter(es.NewTermQuery("status", 1))
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 {
......
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