Commit c034f2e2 by mushishixian

设置串行

parent d38f1a71
......@@ -200,5 +200,5 @@ func main() {
"store",
"direct",
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/",
}, t, 3)
}, t, 1)
}
......@@ -203,5 +203,5 @@ func main() {
"store",
"direct",
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/",
}, t, 3)
}, t, 1)
}
......@@ -50,5 +50,5 @@ func main() {
"store",
"direct",
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/",
}, t, 3)
}, t, 1)
}
......@@ -177,5 +177,5 @@ func main() {
"store",
"direct",
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/",
}, t, 3)
}, t, 1)
}
......@@ -11,9 +11,9 @@ func main() {
message = map[string]interface{}{
"type": "save",
"data": map[string]string{
"FID": "Z8eVSzSLRXKa7ET9WHFzYagYZf0171=",
"FID": "Z8eVSzSLRXKa7ET9WHFzYagYZf017ff=",
"FNUMBER": "WT0050333",
"CFNAME": "深圳市鼎驰达电子有限公司",
"CFNAME": "深圳市鼎驰达电子有限公司11",
},
}
data,err := json.Marshal(message)
......
package main
import "scm_server/cmd/source/customer"
import "scm_server/cmd/source/supplier"
func main() {
//forever := make(chan bool)
//go supplier.Import()
//supplier.Import()
supplier.Import()
//<-forever
customer.Import()
//customer.Import()
//goods.Import()
}
......@@ -14,8 +14,8 @@ var Exchange rabbitmq.QueueExchange
//导入委托方的信息(excel导入)
func init() {
Exchange = rabbitmq.QueueExchange{
"store_customer",
"store_customer",
"store_supplier",
"store_supplier",
"store",
"direct",
"amqp://huntadmin:jy2y2900@192.168.1.237:5672/",
......@@ -35,7 +35,6 @@ func Import() {
if err != nil {
fmt.Printf("open failed: %s\n", err)
}
i := 0
for _, sheet := range xlFile.Sheets {
for key, row := range sheet.Rows {
if key > 0 {
......@@ -44,9 +43,7 @@ func Import() {
supplier.Name = row.Cells[2].String()
//去数据库检测是否已经同步过了
if exist := logic.CheckSupplierExist(supplier.ErpId); exist {
i++
fmt.Println("已存在,跳过")
fmt.Println(i)
//fmt.Println("已存在,跳过")
continue
}
message := make(map[string]interface{})
......
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