Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
46585cfa
提交
46585cfa
authored
6 个月前
作者:
张立波
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
log
上级
0bcb4bbf
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
25 行增加
和
28 行删除
+25
-28
ali.go
upstream/ali/ali.go
+2
-2
ali_new.go
upstream/aliNew/ali_new.go
+2
-2
ali.go
upstream/alibaba/ali.go
+2
-2
dwd.go
upstream/dwd/dwd.go
+3
-6
hdh.go
upstream/hdh/hdh.go
+2
-2
jingdong.go
upstream/jingdong/jingdong.go
+2
-2
schl.go
upstream/schl/schl.go
+2
-2
tm.go
upstream/tm/tm.go
+2
-2
tm.go
upstream/tmNew/tm.go
+2
-2
tm.go
upstream/tmv3/tm.go
+2
-2
wpc.go
upstream/wpc/wpc.go
+2
-2
yunzmall.go
upstream/yunzmall/yunzmall.go
+2
-2
没有找到文件。
upstream/ali/ali.go
浏览文件 @
46585cfa
...
...
@@ -86,9 +86,9 @@ func (s *Config) Post(ctx context.Context, method string, params g.Map) (str str
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"POST"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
Url
)
if
err
!=
nil
{
g
.
Log
()
.
Async
(
true
)
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Async
(
true
)
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v
】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms
】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
str
=
resp
.
ReadAllString
()
...
...
This diff is collapsed.
Click to expand it.
upstream/aliNew/ali_new.go
浏览文件 @
46585cfa
...
...
@@ -86,9 +86,9 @@ func (s *Config) Post(ctx context.Context, method string, params g.Map) (str str
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"POST"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
Url
)
if
err
!=
nil
{
g
.
Log
()
.
Async
(
true
)
.
Cat
(
PkgName
)
.
Ctx
(
ctx
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Cat
(
PkgName
)
.
Ctx
(
ctx
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Async
(
true
)
.
Cat
(
PkgName
)
.
Ctx
(
ctx
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v
】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Cat
(
PkgName
)
.
Ctx
(
ctx
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms
】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
str
=
resp
.
ReadAllString
()
...
...
This diff is collapsed.
Click to expand it.
upstream/alibaba/ali.go
浏览文件 @
46585cfa
...
...
@@ -86,9 +86,9 @@ func (s *Config) Post(ctx context.Context, method string, params g.Map) (str str
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"POST"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
Url
)
if
err
!=
nil
{
g
.
Log
()
.
Async
(
true
)
.
Cat
(
PkgName
)
.
Ctx
(
ctx
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Cat
(
PkgName
)
.
Ctx
(
ctx
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Async
(
true
)
.
Cat
(
PkgName
)
.
Ctx
(
ctx
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v
】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Cat
(
PkgName
)
.
Ctx
(
ctx
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms
】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
str
=
resp
.
ReadAllString
()
...
...
This diff is collapsed.
Click to expand it.
upstream/dwd/dwd.go
浏览文件 @
46585cfa
...
...
@@ -69,8 +69,7 @@ type CommonRes struct {
func
post
(
ctx
context
.
Context
,
method
string
,
req
interface
{})
(
res
*
CommonRes
,
err
error
)
{
//Start := gtime.TimestampMilli()
g
.
Log
()
.
Ctx
(
ctx
)
.
Info
(
gtime
.
Now
()
.
String
())
Start
:=
gtime
.
TimestampMilli
()
AccessToken
,
err
:=
Token
.
Access
(
ctx
)
if
err
!=
nil
{
return
...
...
@@ -94,11 +93,9 @@ func post(ctx context.Context, method string, req interface{}) (res *CommonRes,
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"POST"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
method
)
if
err
!=
nil
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Info
(
gtime
.
Now
()
.
String
())
//g.Log().Async(true).Ctx(ctx).Cat(PkgName).Cat("error").Infof("参数【%v】错误【%v】响应时间【%v】", request.MustToJsonString(), err.Error(), gtime.TimestampMilli()-Start)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms】"
,
request
.
MustToJsonString
(),
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Info
(
gtime
.
Now
()
.
String
())
//g.Log().Async(true).Ctx(ctx).Cat(PkgName).Infof("参数【%v】响应【%v】响应时间【%v】", request.MustToJsonString(), str, gtime.TimestampMilli()-Start)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms】"
,
request
.
MustToJsonString
(),
str
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
str
=
resp
.
ReadAllString
()
...
...
This diff is collapsed.
Click to expand it.
upstream/hdh/hdh.go
浏览文件 @
46585cfa
...
...
@@ -48,9 +48,9 @@ func post(ctx context.Context, method string, req interface{}) (res string, err
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"POST"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
Url
)
if
err
!=
nil
{
g
.
Log
()
.
Async
(
true
)
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v
】"
,
param
.
MustToJsonString
(),
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms
】"
,
param
.
MustToJsonString
(),
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Async
(
true
)
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v
】"
,
param
.
MustToJsonString
(),
res
,
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms
】"
,
param
.
MustToJsonString
(),
res
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
res
=
resp
.
ReadAllString
()
...
...
This diff is collapsed.
Click to expand it.
upstream/jingdong/jingdong.go
浏览文件 @
46585cfa
...
...
@@ -64,9 +64,9 @@ func (s *client) post(ctx context.Context, method string, params g.Map) (str str
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"POST"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
method
)
if
err
!=
nil
{
g
.
Log
()
.
Async
(
true
)
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Async
(
true
)
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
upstream/schl/schl.go
浏览文件 @
46585cfa
...
...
@@ -57,10 +57,10 @@ func (s *Config) Post(ctx context.Context, URL string, bodyMap g.Map) (result st
defer
func
()
{
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
URL
)
if
err
!=
nil
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间:【%v ms】"
,
gjson
.
New
(
bodyMap
)
.
MustToJsonString
(),
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
pkgName
)
.
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间:【%v ms】"
,
gjson
.
New
(
bodyMap
)
.
MustToJsonString
(),
result
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
...
...
This diff is collapsed.
Click to expand it.
upstream/tm/tm.go
浏览文件 @
46585cfa
...
...
@@ -110,9 +110,9 @@ func post(ctx context.Context, method string, params map[string]string) (str str
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"POST"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
apiUrl
+
params
[
"Action"
])
if
err
!=
nil
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
PkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
PkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v
】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms
】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
str
=
resp
.
ReadAllString
()
...
...
This diff is collapsed.
Click to expand it.
upstream/tmNew/tm.go
浏览文件 @
46585cfa
...
...
@@ -55,9 +55,9 @@ func log(ctx context.Context, param string, res interface{}, err error) {
start
:=
gtime
.
TimestampMilli
()
resString
,
_
:=
json
.
Marshal
(
res
)
if
err
!=
nil
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
logName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v
】"
,
param
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
logName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms
】"
,
param
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
start
)
}
else
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
logName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v
】"
,
param
,
string
(
resString
),
gtime
.
TimestampMilli
()
-
start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
logName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms
】"
,
param
,
string
(
resString
),
gtime
.
TimestampMilli
()
-
start
)
}
return
}
...
...
This diff is collapsed.
Click to expand it.
upstream/tmv3/tm.go
浏览文件 @
46585cfa
...
...
@@ -38,9 +38,9 @@ func New(req *Config) {
func
Log
(
ctx
context
.
Context
,
req
interface
{},
res
interface
{},
err
error
,
start
int64
)
{
if
err
!=
nil
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
PkgName
)
.
Errorf
(
"参数【%v】错误【%v】响应时间【%v
ms】"
,
gjson
.
New
(
req
)
.
MustToJsonString
(),
err
.
Error
(),
gtime
.
TimestampMilli
()
-
start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Errorf
(
"参数【%v】错误【%v】响应时间【%v
ms】"
,
gjson
.
New
(
req
)
.
MustToJsonString
(),
err
.
Error
(),
gtime
.
TimestampMilli
()
-
start
)
}
else
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
PkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v
ms】"
,
gjson
.
New
(
req
)
.
MustToJsonString
(),
gjson
.
New
(
res
)
.
MustToJsonString
(),
gtime
.
TimestampMilli
()
-
start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
PkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v
ms】"
,
gjson
.
New
(
req
)
.
MustToJsonString
(),
gjson
.
New
(
res
)
.
MustToJsonString
(),
gtime
.
TimestampMilli
()
-
start
)
}
}
...
...
This diff is collapsed.
Click to expand it.
upstream/wpc/wpc.go
浏览文件 @
46585cfa
...
...
@@ -95,9 +95,9 @@ func post(ctx context.Context, method string, req interface{}) (res string, err
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"POST"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
method
)
if
err
!=
nil
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms
】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v
】"
,
paramStr
,
res
,
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms
】"
,
paramStr
,
res
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
res
=
resp
.
ReadAllString
()
...
...
This diff is collapsed.
Click to expand it.
upstream/yunzmall/yunzmall.go
浏览文件 @
46585cfa
...
...
@@ -119,9 +119,9 @@ func (s *Client) get(ctx context.Context, method string, params g.Map, xToken ..
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"GET"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
method
)
if
err
!=
nil
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms】"
,
paramStr
,
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Async
(
true
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms】"
,
paramStr
,
str
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论