Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
facd501a
Commit
facd501a
authored
May 23, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tmInfoPusherApi log
parent
1b76f19a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
fqboss/app/base/api/impl/tmInfoPusherApi.js
+19
-0
No files found.
fqboss/app/base/api/impl/tmInfoPusherApi.js
View file @
facd501a
...
...
@@ -3,6 +3,8 @@ const System = require("../../system");
const
request
=
require
(
'request'
);
const
aliyunClient
=
require
(
'../../utils/aliyunClient.js'
);
const
OplogSve
=
require
(
'../../service/impl/oplogSve.js'
);
// this.fqReqUrl = "https://yunfuapi.gongsibao.com";//线上域名
let
fqReqUrl
=
"https://yunfuapi-dev.gongsibao.com"
;
//dev域名
...
...
@@ -12,6 +14,7 @@ class TmInfoPusherApi {
this
.
trademarkS
=
System
.
getObject
(
"service.trademarkSve"
);
this
.
tmapplierinfoDao
=
System
.
getObject
(
"db.tmapplierinfoDao"
);
this
.
aliyunClient
=
new
aliyunClient
();
this
.
oplogSve
=
new
OplogSve
();
};
async
collectInfo
()
{
...
...
@@ -54,6 +57,14 @@ class TmInfoPusherApi {
let
res
=
await
this
.
aliyunClient
.
postig
(
url
,
body
);
console
.
log
(
'推送完成--'
+
i
,
res
);
//将成功结果写入到日志
await
this
.
oplogSve
.
create
({
logLevel
:
"info"
,
optitle
:
"推送商标数据至蜂擎---"
,
op
:
"app/base/api/impl/tmInfoPusherApi.js/collectInfo"
,
content
:
"参数:"
+
JSON
.
stringify
(
body
)
+
"返回结果:"
+
JSON
.
stringify
(
res
),
clientIp
:
""
});
//更新isPushed字段为1
await
this
.
trademarkS
.
updateIsPushed
(
d
.
id
);
...
...
@@ -63,6 +74,14 @@ class TmInfoPusherApi {
return
{
code
:
200
,
message
:
"调用推送接口成功"
};
}
catch
(
e
)
{
console
.
log
(
'collectInfo error: '
,
e
);
//将错误写入到日志
await
this
.
oplogSve
.
create
({
logLevel
:
"error"
,
optitle
:
"推送商标数据至蜂擎---异常"
,
op
:
"app/base/api/impl/tmInfoPusherApi.js/collectInfo"
,
content
:
JSON
.
stringify
(
e
.
stack
),
clientIp
:
""
});
return
e
;
}
}
...
...
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