Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang_asynctask
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f548e9a9
authored
Aug 13, 2021
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加时间监听
parent
2440c46a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
cmd/scm/sync_customs/main.go
cmd/scm/sync_customs/main.go
View file @
f548e9a9
...
...
@@ -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://1
72.18.137.19
:50005/"
)
client
:=
rpc
.
NewHTTPClient
(
"http://1
19.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
))
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment