Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
scm_server
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
20db06bd
authored
Apr 27, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
mq配置地址
parent
3b7ea87b
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
27 additions
and
20 deletions
cmd/queue/sync_customer/main.go
cmd/queue/sync_customer/product.go
cmd/queue/sync_goods/main.go
cmd/queue/sync_goods/product.go
cmd/queue/sync_in_store/main.go
cmd/queue/sync_in_store/product.go
cmd/queue/sync_out_store/main.go
cmd/queue/sync_out_store/product.go
cmd/queue/sync_status/main.go
cmd/queue/sync_status/product/product_status_queue.go
cmd/queue/sync_status/request.go
cmd/queue/sync_supplier/main.go
cmd/queue/sync_supplier/product.go
cmd/source/customer/customer.go
cmd/source/goods/goods.go
cmd/source/supplier/supplier.go
cmd/queue/sync_customer/main.go
View file @
20db06bd
...
...
@@ -186,6 +186,6 @@ func main() {
"store_customer"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
}
cmd/queue/sync_customer/product.go
View file @
20db06bd
...
...
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"scm_server/configs"
)
func
main
()
{
...
...
@@ -24,8 +25,8 @@ func main() {
"CFNAME"
:
"深圳市肯特尔科技有限公司"
,
},
}
data
,
err
:=
json
.
Marshal
(
message
)
if
err
!=
nil
{
data
,
err
:=
json
.
Marshal
(
message
)
if
err
!=
nil
{
fmt
.
Println
(
err
)
}
body
:=
string
(
data
)
...
...
@@ -34,7 +35,7 @@ func main() {
"store_customer"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
rabbitmq
.
Send
(
queueExchange
,
body
)
...
...
cmd/queue/sync_goods/main.go
View file @
20db06bd
...
...
@@ -190,6 +190,6 @@ func main() {
"store_goods"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
}
cmd/queue/sync_goods/product.go
View file @
20db06bd
...
...
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"scm_server/configs"
)
func
main
()
{
...
...
@@ -27,7 +28,7 @@ func main() {
"store_goods"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
rabbitmq
.
Send
(
queueExchange
,
body
)
...
...
cmd/queue/sync_in_store/main.go
View file @
20db06bd
...
...
@@ -248,6 +248,6 @@ func main() {
"store_in"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
}
cmd/queue/sync_in_store/product.go
View file @
20db06bd
...
...
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"scm_server/configs"
)
func
main
()
{
...
...
@@ -18,8 +19,8 @@ func main() {
"CFIsInsp"
:
false
,
"FPrincipalNo"
:
"WT00018"
,
//"FPrincipalNo": "FIZXuVrXRCms51pqby5EVagYZf0=",
"FSupplierNo"
:
"M0000045"
,
"FBizType"
:
"执行采购"
,
"FSupplierNo"
:
"M0000045"
,
"FBizType"
:
"执行采购"
,
"FEntrys"
:
[]
map
[
string
]
interface
{}{
{
"FQty"
:
9
,
...
...
@@ -48,7 +49,7 @@ func main() {
"store_in"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
rabbitmq
.
Send
(
queueExchange
,
body
)
...
...
cmd/queue/sync_out_store/main.go
View file @
20db06bd
...
...
@@ -228,6 +228,6 @@ func main() {
"store_out"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
}
cmd/queue/sync_out_store/product.go
View file @
20db06bd
...
...
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"scm_server/configs"
)
func
main
()
{
...
...
@@ -46,7 +47,7 @@ func main() {
"store_out"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
rabbitmq
.
Send
(
queueExchange
,
body
)
...
...
cmd/queue/sync_status/main.go
View file @
20db06bd
...
...
@@ -217,6 +217,6 @@ func main() {
"store_sync_status"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
}
cmd/queue/sync_status/product/product_status_queue.go
View file @
20db06bd
...
...
@@ -3,6 +3,7 @@ package product
import
(
"encoding/json"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"scm_server/configs"
)
func
SyncErpStatus
(
syncName
string
,
ErpId
string
)
(
err
error
)
{
...
...
@@ -22,7 +23,7 @@ func SyncErpStatus(syncName string, ErpId string) (err error) {
"store_sync_status"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
rabbitmq
.
Send
(
queueExchange
,
body
)
...
...
cmd/queue/sync_status/request.go
View file @
20db06bd
...
...
@@ -3,6 +3,7 @@ package main
import
(
"encoding/json"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"scm_server/configs"
)
func
main
(){
...
...
@@ -23,7 +24,7 @@ func main(){
"store_sync_status"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
rabbitmq
.
Send
(
queueExchange
,
body
)
...
...
cmd/queue/sync_supplier/main.go
View file @
20db06bd
...
...
@@ -186,6 +186,6 @@ func main() {
"store_supplier"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
}
cmd/queue/sync_supplier/product.go
View file @
20db06bd
...
...
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"scm_server/configs"
)
func
main
()
{
...
...
@@ -26,7 +27,7 @@ func main() {
"store_supplier"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
rabbitmq
.
Send
(
queueExchange
,
body
)
...
...
cmd/source/customer/customer.go
View file @
20db06bd
...
...
@@ -18,7 +18,7 @@ func init() {
"store_customer"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
}
func
Import
()
{
...
...
cmd/source/goods/goods.go
View file @
20db06bd
...
...
@@ -18,7 +18,7 @@ func init() {
"store_goods"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
}
...
...
cmd/source/supplier/supplier.go
View file @
20db06bd
...
...
@@ -18,7 +18,7 @@ func init() {
"store_supplier"
,
"store"
,
"direct"
,
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
,
configs
.
RABBITMQDSN
,
}
}
...
...
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