Commit da7e1d1e by mushishixian

修复大小写敏感

parent 3d3630c4
......@@ -71,6 +71,8 @@ func Import(wg *sync.WaitGroup) {
fmt.Println(err)
}
body := string(data)
fmt.Println(body)
return
rabbitmq.Send(Exchange, body)
}
}
......
......@@ -67,6 +67,8 @@ func Import(wg *sync.WaitGroup) {
fmt.Println(err)
}
body := string(data)
fmt.Println(body)
return
rabbitmq.Send(Exchange, body)
}
}
......
......@@ -2,8 +2,6 @@ package main
import (
"flag"
"scm_server/cmd/source/customer"
"scm_server/cmd/source/goods"
"scm_server/cmd/source/supplier"
"scm_server/configs"
"sync"
......@@ -15,9 +13,9 @@ func main() {
flag.Parse()
configs.Setup(path)
var wg sync.WaitGroup
wg.Add(3)
wg.Add(1)
go supplier.Import(&wg)
go customer.Import(&wg)
go goods.Import(&wg)
//go customer.Import(&wg)
//go goods.Import(&wg)
wg.Wait()
}
......@@ -68,6 +68,8 @@ func Import(wg *sync.WaitGroup) {
fmt.Println(err)
}
body := string(data)
fmt.Println(body)
return
rabbitmq.Send(Exchange, body)
}
}
......
......@@ -6,19 +6,19 @@ import (
"time"
)
const CheckCustomerExistSql = "SELECT customer_id FROM lie_customer WHERE erp_id = ?"
const CheckCustomerExistSql = "SELECT customer_id FROM lie_customer WHERE binary erp_id = ?"
const CheckCustomerSyncStatusSql = "SELECT sync_status FROM lie_customer WHERE erp_id = ?"
const CheckCustomerSyncStatusSql = "SELECT sync_status FROM lie_customer WHERE binary erp_id = ?"
const InsertCustomerSql = "Insert INTO `lie_customer` (`erp_client_code`,`name`,`erp_id`,`add_time`,`sync_status`) VALUES (?,?,?,?,?)"
const UpdateCustomerSql = "UPDATE `lie_customer` SET `erp_client_code` = ? , `name` = ? , `update_time` = ? WHERE `erp_id` = ?"
const UpdateCustomerSql = "UPDATE `lie_customer` SET `erp_client_code` = ? , `name` = ? , `update_time` = ? WHERE binary `erp_id` = ?"
const DeleteCustomerSql = "UPDATE `lie_customer` SET `status` = ? , `update_time` = ? WHERE `erp_id` = ?"
const DeleteCustomerSql = "UPDATE `lie_customer` SET `status` = ? , `update_time` = ? WHERE binary `erp_id` = ?"
const SyncCustomerSuccessSql = "UPDATE `lie_customer` SET sync_status = 1 , sync_time = ? WHERE erp_id = ?"
const SyncCustomerSuccessSql = "UPDATE `lie_customer` SET sync_status = 1 , sync_time = ? WHERE binary erp_id = ?"
const SyncCustomerErpSuccessSql = "UPDATE `lie_customer` SET sync_erp_status = 1 , sync_time = ? WHERE erp_id = ?"
const SyncCustomerErpSuccessSql = "UPDATE `lie_customer` SET sync_erp_status = 1 , sync_time = ? WHERE binary erp_id = ?"
//修改同步到erp成功的状态
func SyncCustomerErpSuccess(erpId string) (err error) {
......
......@@ -6,21 +6,21 @@ import (
"time"
)
const CheckGoodsExistSql = "SELECT goods_id FROM lie_goods WHERE erp_id = ?"
const CheckGoodsExistSql = "SELECT goods_id FROM lie_goods WHERE binary erp_id = ?"
const CheckGoodsSyncStatusSql = "SELECT sync_status FROM lie_goods WHERE erp_id = ?"
const CheckGoodsSyncStatusSql = "SELECT sync_status FROM lie_goods WHERE binary erp_id = ?"
const InsertGoodsSql = "INSERT INTO `lie_goods` (`goods_name`,`goods_cn_name`,`brand_name`,`erp_id`,`add_time`,`sync_status`) VALUES (?,?,?,?,?,?)"
const UpdateGoodsSql = "UPDATE `lie_goods` SET `goods_name` = ? , `goods_cn_name` = ? , `brand_name` = ? , `update_time` = ? WHERE `erp_id` = ?"
const UpdateGoodsSql = "UPDATE `lie_goods` SET `goods_name` = ? , `goods_cn_name` = ? , `brand_name` = ? , `update_time` = ? WHERE binary `erp_id` = ?"
const DeleteGoodsSql = "UPDATE `lie_goods` SET `status` = ? , `update_time` = ? WHERE `erp_id` = ?"
const DeleteGoodsSql = "UPDATE `lie_goods` SET `status` = ? , `update_time` = ? WHERE binary `erp_id` = ?"
const SyncGoodsSuccessSql = "UPDATE `lie_goods` SET sync_status = 1 , sync_time = ? WHERE erp_id = ?"
const SyncGoodsSuccessSql = "UPDATE `lie_goods` SET sync_status = 1 , sync_time = ? WHERE binary erp_id = ?"
const SyncGoodsSuccessWithStatusSql = "UPDATE `lie_goods` SET sync_status = 1 , sync_time = ? , status = ? WHERE erp_id = ?"
const SyncGoodsSuccessWithStatusSql = "UPDATE `lie_goods` SET sync_status = 1 , sync_time = ? , status = ? WHERE binary erp_id = ?"
const SyncGoodsErpSuccessSql = "UPDATE `lie_goods` SET sync_erp_status = 1 , sync_time = ? WHERE erp_id = ?"
const SyncGoodsErpSuccessSql = "UPDATE `lie_goods` SET sync_erp_status = 1 , sync_time = ? WHERE binary erp_id = ?"
//修改同步到erp成功的状态
func SyncGoodsErpSuccess(erpId string) (err error) {
......
......@@ -6,21 +6,21 @@ import (
"time"
)
const CheckSupplierExistSql = "SELECT supplier_id FROM lie_supplier WHERE erp_id = ?"
const CheckSupplierExistSql = "SELECT supplier_id FROM lie_supplier WHERE binary erp_id = ?"
const CheckSupplierSyncStatusSql = "SELECT sync_status FROM lie_supplier WHERE erp_id = ?"
const CheckSupplierSyncStatusSql = "SELECT sync_status FROM lie_supplier WHERE binary erp_id = ?"
const InsertSupplierSql = "Insert INTO `lie_supplier` (`erp_supplier_code`,`name`,`erp_id`,`add_time`,`sync_status`) VALUES (?,?,?,?,?)"
const UpdateSupplierSql = "UPDATE `lie_supplier` SET `erp_supplier_code` = ? , `name` = ? , `update_time` = ? WHERE `erp_id` = ?"
const UpdateSupplierSql = "UPDATE `lie_supplier` SET `erp_supplier_code` = ? , `name` = ? , `update_time` = ? WHERE binary `erp_id` = ?"
const DeleteSupplierSql = "UPDATE `lie_supplier` SET `status` = ? , `update_time` = ? WHERE `erp_id` = ?"
const DeleteSupplierSql = "UPDATE `lie_supplier` SET `status` = ? , `update_time` = ? WHERE binary `erp_id` = ?"
const WriteSupplierSyncErrorSql = "UPDATE `lie_supplier` SET sync_time = ? , sync_status = ? , sync_error = ? WHERE erp_id = ?"
const WriteSupplierSyncErrorSql = "UPDATE `lie_supplier` SET sync_time = ? , sync_status = ? , sync_error = ? WHERE binary erp_id = ?"
const SyncSupplierSuccessSql = "UPDATE `lie_supplier` SET sync_status = 1 , sync_time = ? WHERE erp_id = ?"
const SyncSupplierSuccessSql = "UPDATE `lie_supplier` SET sync_status = 1 , sync_time = ? WHERE binary erp_id = ?"
const SyncSupplierErpSuccessSql = "UPDATE `lie_supplier` SET sync_erp_status = 1 , sync_time = ? WHERE erp_id = ?"
const SyncSupplierErpSuccessSql = "UPDATE `lie_supplier` SET sync_erp_status = 1 , sync_time = ? WHERE binary erp_id = ?"
//修改同步到erp成功的状态
func SyncSupplierErpSuccess(erpId string) (err error) {
......
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