Commit 340655b6 by mushishixian

添加记录时间

parent 3e4e9f77
Showing with 4 additions and 0 deletions
......@@ -11,6 +11,7 @@ import (
"scm_server/internal/logic"
"scm_server/internal/model"
"scm_server/internal/service"
"time"
)
type RecvPro struct {
......@@ -112,10 +113,13 @@ func SyncGoodsData(operate string, goods model.Goods) (err error) {
}
req.Debug = false
if operate == "update" || operate == "insert" {
start := time.Now()
resp, err = req.Post(url, param)
if err != nil {
return
}
elapsed := time.Since(start)
logic.LogError("执行接口请求所花时间为:" + fmt.Sprintf("%s", elapsed))
if err = resp.ToJSON(&respData); err != nil {
return
}
......
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