Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
scm_server
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
340655b6
authored
May 18, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加记录时间
parent
3e4e9f77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
cmd/queue/sync_goods/main.go
cmd/queue/sync_goods/main.go
View file @
340655b6
...
@@ -11,6 +11,7 @@ import (
...
@@ -11,6 +11,7 @@ import (
"scm_server/internal/logic"
"scm_server/internal/logic"
"scm_server/internal/model"
"scm_server/internal/model"
"scm_server/internal/service"
"scm_server/internal/service"
"time"
)
)
type
RecvPro
struct
{
type
RecvPro
struct
{
...
@@ -112,10 +113,13 @@ func SyncGoodsData(operate string, goods model.Goods) (err error) {
...
@@ -112,10 +113,13 @@ func SyncGoodsData(operate string, goods model.Goods) (err error) {
}
}
req
.
Debug
=
false
req
.
Debug
=
false
if
operate
==
"update"
||
operate
==
"insert"
{
if
operate
==
"update"
||
operate
==
"insert"
{
start
:=
time
.
Now
()
resp
,
err
=
req
.
Post
(
url
,
param
)
resp
,
err
=
req
.
Post
(
url
,
param
)
if
err
!=
nil
{
if
err
!=
nil
{
return
return
}
}
elapsed
:=
time
.
Since
(
start
)
logic
.
LogError
(
"执行接口请求所花时间为:"
+
fmt
.
Sprintf
(
"%s"
,
elapsed
))
if
err
=
resp
.
ToJSON
(
&
respData
);
err
!=
nil
{
if
err
=
resp
.
ToJSON
(
&
respData
);
err
!=
nil
{
return
return
}
}
...
...
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