Commit f548e9a9 by Joneq

增加时间监听

parent 2440c46a
Showing with 7 additions and 3 deletions
......@@ -50,8 +50,9 @@ var currentDatetime int64
//同步海关信息至中间库
func main() {
//UpdateOldGoodsId()
//panic(1)
UpdateOldGoodsId()
panic(1)
runtime.GOMAXPROCS(5)
//获取当天时间
......@@ -241,7 +242,7 @@ func UpdateOldGoodsId() {
numArr []string
)
client := rpc.NewHTTPClient("http://172.18.137.19:50005/")
client := rpc.NewHTTPClient("http://119.23.228.186:50005/")
client.UseService(&sub)
......@@ -250,11 +251,14 @@ func UpdateOldGoodsId() {
for _,v:=range numArr{
startTime := time.Now()
result,_ := sub.GetCustomsDockingData(`{"tableName":"Purchase_Order2","bizDate":"`+v+`"}`)
fmt.Println("正在修改"+v)
fmt.Println("获取数据时间",time.Since(startTime))
if gjson.Get(result,"0.goods_id").String() != "" {
sqlDb.Exec("update Purchase_Order set goods_id = '"+gjson.Get(result,"0.goods_id").String()+"' where number ='"+v+"'")
}
fmt.Println("修改时间",time.Since(startTime))
}
}
......
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