Commit efca12cc by mushishixian

修复

parent be521fb6
......@@ -35,7 +35,7 @@ func Import(wg *sync.WaitGroup) {
err error
customer model.Customer
)
excelFileName = "./cmd/source/data/customer.xlsx"
excelFileName = "../cmd/source/data/customer.xlsx"
xlFile, err = xlsx.OpenFile(excelFileName)
if err != nil {
fmt.Printf("open failed: %s\n", err)
......@@ -71,6 +71,8 @@ func Import(wg *sync.WaitGroup) {
fmt.Println(err)
}
body := string(data)
fmt.Println(body)
return
rabbitmq.Send(Exchange, body)
}
}
......
......@@ -34,7 +34,7 @@ func Import(wg *sync.WaitGroup) {
err error
goods model.Goods
)
excelFileName = "./cmd/source/data/goods.xlsx"
excelFileName = "../cmd/source/data/goods.xlsx"
xlFile, err = xlsx.OpenFile(excelFileName)
if err != nil {
fmt.Printf("open failed: %s\n", err)
......@@ -67,6 +67,8 @@ func Import(wg *sync.WaitGroup) {
fmt.Println(err)
}
body := string(data)
fmt.Println(body)
return
rabbitmq.Send(Exchange, body)
}
}
......
......@@ -11,7 +11,7 @@ import (
func main() {
var path string
flag.StringVar(&path, "config", "conf/config.ini", "conf/config.ini")
flag.StringVar(&path, "config", "../conf/config.ini", "conf/config.ini")
flag.Parse()
configs.Setup(path)
var wg sync.WaitGroup
......
......@@ -3,13 +3,14 @@ package supplier
import (
"encoding/json"
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/tealeg/xlsx"
"scm_server/configs"
"scm_server/internal/logic"
"scm_server/internal/model"
"scm_server/internal/service"
"sync"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/tealeg/xlsx"
)
var Exchange rabbitmq.QueueExchange
......@@ -37,7 +38,7 @@ func Import(wg *sync.WaitGroup) {
err error
supplier model.Supplier
)
excelFileName = "./cmd/source/data/supplier.xlsx"
excelFileName = "../cmd/source/data/supplier.xlsx"
xlFile, err = xlsx.OpenFile(excelFileName)
if err != nil {
fmt.Printf("open failed: %s\n", err)
......@@ -67,6 +68,8 @@ func Import(wg *sync.WaitGroup) {
fmt.Println(err)
}
body := string(data)
fmt.Println(body)
return
rabbitmq.Send(Exchange, body)
}
}
......
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