Commit 20d76816 by mushishixian

fix

parent a9a1c24d
Showing with 10 additions and 13 deletions
......@@ -11,24 +11,21 @@ import (
type RecvPro struct {
}
var number int
func init() {
//queueExchange := rabbitmq.QueueExchange{
// "supplier_erp",
// "",
// "",
// "",
// "amqp://guest:guest@192.168.2.232:5672/",
//}
//
//str := `{"supplierNumber":"C0000102","PTID":"L0000002","supplierID":"LxYAAAG0CQA3xn38","supplierName":"TestName"}`
queueExchange := rabbitmq.QueueExchange{
"supplier_erp",
"",
"",
"",
"amqp://guest:guest@192.168.2.232:5672/",
}
str := `{"supplierNumber":"C0000102","PTID":"L0000002","supplierID":"LxYAAAG0CQA3xn38","supplierName":"TestName"}`
//str := `{"supplierNumber":"C0000102","PTID":"12324","supplierID":"LxYAAAG0CQA3xn38"}`
//rabbitmq.Send(queueExchange, str)
rabbitmq.Send(queueExchange, str)
}
func (t *RecvPro) Consumer(dataByte []byte) (err error) {
number++
message := string(dataByte)
supplierCode := gjson.Get(message, "PTID").String()
erpSupplierCode := gjson.Get(message, "supplierNumber").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