Commit 512c844d by mushishixian

修复

parent a642e408
...@@ -15,15 +15,6 @@ import ( ...@@ -15,15 +15,6 @@ import (
var Exchange rabbitmq.QueueExchange var Exchange rabbitmq.QueueExchange
//导入委托方的信息(excel导入) //导入委托方的信息(excel导入)
func init() {
Exchange = rabbitmq.QueueExchange{
"store_customer",
"store_customer",
"store",
"direct",
configs.RABBITMQDSN,
}
}
func Import(wg *sync.WaitGroup) { func Import(wg *sync.WaitGroup) {
defer func() { defer func() {
if err := recover(); err != nil { if err := recover(); err != nil {
...@@ -31,6 +22,13 @@ func Import(wg *sync.WaitGroup) { ...@@ -31,6 +22,13 @@ func Import(wg *sync.WaitGroup) {
} }
wg.Done() wg.Done()
}() }()
Exchange = rabbitmq.QueueExchange{
"store_customer",
"store_customer",
"store",
"direct",
configs.RABBITMQDSN,
}
var ( var (
excelFileName string excelFileName string
xlFile *xlsx.File xlFile *xlsx.File
......
...@@ -14,7 +14,7 @@ import ( ...@@ -14,7 +14,7 @@ import (
var Exchange rabbitmq.QueueExchange var Exchange rabbitmq.QueueExchange
//导入委托方的信息(excel导入) //导入委托方的信息(excel导入)
func init() { func Import(wg *sync.WaitGroup) {
Exchange = rabbitmq.QueueExchange{ Exchange = rabbitmq.QueueExchange{
"store_goods", "store_goods",
"store_goods", "store_goods",
...@@ -22,10 +22,6 @@ func init() { ...@@ -22,10 +22,6 @@ func init() {
"direct", "direct",
configs.RABBITMQDSN, configs.RABBITMQDSN,
} }
}
//导入委托方的信息(excel导入)
func Import(wg *sync.WaitGroup) {
defer func() { defer func() {
if err := recover(); err != nil { if err := recover(); err != nil {
service.SendDingTalkRobotToApi(fmt.Sprintf("%s", err)) service.SendDingTalkRobotToApi(fmt.Sprintf("%s", err))
......
package main package main
import ( import (
"flag"
"scm_server/cmd/source/customer" "scm_server/cmd/source/customer"
"scm_server/cmd/source/goods" "scm_server/cmd/source/goods"
"scm_server/cmd/source/supplier" "scm_server/cmd/source/supplier"
"scm_server/configs"
"sync" "sync"
) )
func main() { func main() {
var path string
flag.StringVar(&path, "config", "conf/config.ini", "conf/config.ini")
flag.Parse()
configs.Setup(path)
var wg sync.WaitGroup var wg sync.WaitGroup
wg.Add(3) wg.Add(3)
go supplier.Import(&wg) go supplier.Import(&wg)
......
...@@ -15,15 +15,6 @@ import ( ...@@ -15,15 +15,6 @@ import (
var Exchange rabbitmq.QueueExchange var Exchange rabbitmq.QueueExchange
//导入委托方的信息(excel导入) //导入委托方的信息(excel导入)
func init() {
Exchange = rabbitmq.QueueExchange{
"store_supplier",
"store_supplier",
"store",
"direct",
configs.RABBITMQDSN,
}
}
//导入委托方的信息(excel导入) //导入委托方的信息(excel导入)
func Import(wg *sync.WaitGroup) { func Import(wg *sync.WaitGroup) {
...@@ -33,6 +24,13 @@ func Import(wg *sync.WaitGroup) { ...@@ -33,6 +24,13 @@ func Import(wg *sync.WaitGroup) {
} }
wg.Done() wg.Done()
}() }()
Exchange = rabbitmq.QueueExchange{
"store_supplier",
"store_supplier",
"store",
"direct",
configs.RABBITMQDSN,
}
var ( var (
excelFileName string excelFileName string
xlFile *xlsx.File xlFile *xlsx.File
......
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