Commit 5a658fa0 by mushishixian

fix

parent 87136327
Showing with 5 additions and 2 deletions
...@@ -22,7 +22,7 @@ func init() { ...@@ -22,7 +22,7 @@ func init() {
// "amqp://huntadmin:jy2y2900@192.168.1.237:5672/", // "amqp://huntadmin:jy2y2900@192.168.1.237:5672/",
//} //}
// //
//str := `{"bom_id":571,"delivery_type":1,"sort":1}` //str := `{"bom_id":599,"delivery_type":1,"sort":1}`
//rabbitmq.Send(queueExchange, str) //rabbitmq.Send(queueExchange, str)
} }
......
...@@ -56,7 +56,10 @@ func MatchGoodsNameByAttrs(bomItems []model.BomItem) (result []model.BomItem, er ...@@ -56,7 +56,10 @@ func MatchGoodsNameByAttrs(bomItems []model.BomItem) (result []model.BomItem, er
if responses.Hits != nil { if responses.Hits != nil {
for _, hit := range responses.Hits.Hits { for _, hit := range responses.Hits.Hits {
res, _ := hit.Source.MarshalJSON() res, _ := hit.Source.MarshalJSON()
bomItems[key].GoodsName = gjson.Get(string(res), "goods_name").String() //CS0805KKX7R9BB105
if bomItems[key].GoodsName == "" {
bomItems[key].GoodsName = gjson.Get(string(res), "goods_name").String()
}
} }
} }
} }
......
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