Commit d9002873 by 宋毅

增加百度日志

parent 487eab0b
...@@ -665,7 +665,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -665,7 +665,7 @@ class RegCenterOrderService extends AppServiceBase {
reqbody: pushObj reqbody: pushObj
}); });
if (ress.data.status != 0) { if (ress.data.status != 0) {
return system.getResultFail(ress.data.msg) return system.getResultFail(-1,ress.data.msg)
} }
console.log("regWriteCommunicationLog---------", ress) console.log("regWriteCommunicationLog---------", ress)
} }
......
...@@ -6,12 +6,13 @@ class baiduRegClient { ...@@ -6,12 +6,13 @@ class baiduRegClient {
constructor() { constructor() {
this.pushlogSve = system.getObject("service.common.pushlogSve"); this.pushlogSve = system.getObject("service.common.pushlogSve");
this.execClient = system.getObject("util.execClient"); this.execClient = system.getObject("util.execClient");
this.execClientNew = system.getObject("util.execClientNew");
this.baiduRegClientParams = settings.baiduRegClientParams(); this.baiduRegClientParams = settings.baiduRegClientParams();
} }
//2020 1027 laolan 调用百度网关 //2020 1027 laolan 调用百度网关
async baiduPost( path, actionBody) { async baiduPost( path, actionBody) {
console.log('actionBody++',actionBody) // console.log('actionBody++',actionBody)
let domain = this.baiduRegClientParams.domain; let domain = this.baiduRegClientParams.domain;
let url = domain+path; let url = domain+path;
let version ="bce-auth-v1"; let version ="bce-auth-v1";
...@@ -32,7 +33,7 @@ class baiduRegClient { ...@@ -32,7 +33,7 @@ class baiduRegClient {
canonicalRequest = "POST" + "\n" + path + "\n" + "\n" + canonicalHeaders; canonicalRequest = "POST" + "\n" + path + "\n" + "\n" + canonicalHeaders;
} }
// let canonicalRequest = "POST" + "\n" + path + "\n" + "\n" + canonicalHeaders; // let canonicalRequest = "POST" + "\n" + path + "\n" + "\n" + canonicalHeaders;
console.log('canonicalRequest+++++++',canonicalRequest) // console.log('canonicalRequest+++++++',canonicalRequest)
//authStringPrefix(前缀字符串,由除sk字段外的签名信息生成) //authStringPrefix(前缀字符串,由除sk字段外的签名信息生成)
let authStringPrefix = version+"/"+accessKey+"/"+timestamp+"/"+extime; let authStringPrefix = version+"/"+accessKey+"/"+timestamp+"/"+extime;
//中间结果2:派生签名密钥 signingKey //中间结果2:派生签名密钥 signingKey
...@@ -50,9 +51,10 @@ class baiduRegClient { ...@@ -50,9 +51,10 @@ class baiduRegClient {
data:actionBody data:actionBody
} }
var rtn = await this.execClient.execBaiduPost(baiduObj, url); var rtn = await this.execClient.execBaiduPost(baiduObj, url);
console.log("baiduObj+++++",baiduObj) this.execClientNew.execLogs("api-center-channel-baiduPost:"+url, baiduObj, "center-channel-baiduPost", rtn, null);
console.log("url+++++",url) // console.log("baiduObj+++++",baiduObj)
console.log("rtn+++++",rtn) // console.log("url+++++",url)
// console.log("rtn+++++",rtn)
if (!rtn || !rtn.stdout) { if (!rtn || !rtn.stdout) {
return system.getResult(null, "execPost data is empty"); return system.getResult(null, "execPost data is empty");
} }
......
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 to comment