Commit b948df87 by mushishixian

debug code

parent e8b084d6
Showing with 14 additions and 10 deletions
...@@ -14,16 +14,18 @@ type RecvPro struct { ...@@ -14,16 +14,18 @@ type RecvPro struct {
} }
func init() { func init() {
queueExchange := rabbitmq.QueueExchange{ if configs.ApiSetting.Mode == "debug" {
"bom_match", queueExchange := rabbitmq.QueueExchange{
"bom_match", "bom_match",
"bom", "bom_match",
"direct", "bom",
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/", "direct",
} "amqp://huntadmin:jy2y2900@192.168.1.237:5672/",
}
str := `{"bom_id":408,"delivery_type":1,"sort":2}` str := `{"bom_id":408,"delivery_type":1,"sort":2}`
rabbitmq.Send(queueExchange, str) rabbitmq.Send(queueExchange, str)
}
} }
func (t *RecvPro) Consumer(dataByte []byte) (err error) { func (t *RecvPro) Consumer(dataByte []byte) (err error) {
......
...@@ -329,7 +329,9 @@ func getTermQuery(goodsName, brandName string, number int, flag bool) (query *es ...@@ -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("single_price").Gt(0))
//query = query.Filter(es.NewRangeQuery("stock").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)) //query = query.Filter(es.NewRangeQuery("single_price").Gt(0))
//src, err := query.Source() //src, err := query.Source()
//if err != nil { //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