Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wang
/
go_upload_sync
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
20d76816
authored
Mar 23, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
a9a1c24d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
app/queue/supplier.go
app/queue/supplier.go
View file @
20d76816
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment