Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
go_supplier_sever
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
792cad52
authored
Mar 23, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化
parent
14ecfe48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
.gitignore
app/queue/supplier.go
.gitignore
View file @
792cad52
/logs
/logs
/.idea
/.idea
/config/*.toml
/config/*.toml
*.properties
*.exe
*.exe~
gowatch.yml
app/queue/supplier.go
View file @
792cad52
...
@@ -23,7 +23,7 @@ func init() {
...
@@ -23,7 +23,7 @@ func init() {
//}
//}
//
//
//str := `{"supplierNumber":"C0000102","PTID":"L0000002","supplierID":"LxYAAAG0CQA3xn38","supplierName":"TestName"}`
//str := `{"supplierNumber":"C0000102","PTID":"L0000002","supplierID":"LxYAAAG0CQA3xn38","supplierName":"TestName"}`
//
//
str := `{"supplierNumber":"C0000102","PTID":"12324","supplierID":"LxYAAAG0CQA3xn38"}`
//str := `{"supplierNumber":"C0000102","PTID":"12324","supplierID":"LxYAAAG0CQA3xn38"}`
//rabbitmq.Send(queueExchange, str)
//rabbitmq.Send(queueExchange, str)
}
}
...
@@ -33,8 +33,8 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
...
@@ -33,8 +33,8 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
supplierCode
:=
gjson
.
Get
(
message
,
"PTID"
)
.
String
()
supplierCode
:=
gjson
.
Get
(
message
,
"PTID"
)
.
String
()
erpSupplierCode
:=
gjson
.
Get
(
message
,
"supplierNumber"
)
.
String
()
erpSupplierCode
:=
gjson
.
Get
(
message
,
"supplierNumber"
)
.
String
()
erpSupplierName
:=
gjson
.
Get
(
message
,
"supplierName"
)
.
String
()
erpSupplierName
:=
gjson
.
Get
(
message
,
"supplierName"
)
.
String
()
err
=
service
.
AddSupplierSync
(
supplierCode
,
erpSupplierCode
,
erpSupplierName
)
err
=
service
.
AddSupplierSync
(
supplierCode
,
erpSupplierCode
,
erpSupplierName
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Println
(
err
)
fmt
.
Println
(
err
)
}
}
return
nil
return
nil
...
...
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