Commit 512c844d by mushishixian

修复

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