Commit bcd95055 by 宋毅

修改推送记录

parent 7c1e4cb3
......@@ -60,18 +60,9 @@ class AppServiceBase {
var result = JSON.parse(rtn.stdout);
return result;
} catch (e) {
var errorMsg = "error:" + e.stack;
//日志记录
this.logCtl.error({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/app.base.js/restPostUrl",
content: errorMsg,
// clientIp: pobj.clientIp,
optitle: pobj.opType + "推送操作异常->restPostUrl",
});
return system.getResult(null, errorMsg);
const stackStr = e.stack ? e.stack : JSON.stringify(e);
this.execClientNew.execLogs(`推送操作异常-api-center-channel-url:${url}`, pobj, "center-channel-restPostUrl", null, stackStr);
return system.getResult(null, stackStr);
}
}
......@@ -87,18 +78,9 @@ class AppServiceBase {
var result = JSON.parse(rtn.stdout);
return result;
} catch (e) {
var errorMsg = "error:" + e.stack;
//日志记录
this.logCtl.error({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/app.base.js/restPostWithHValueUrl",
content: errorMsg,
// clientIp: pobj.clientIp,
optitle: pobj.opType + "推送操作异常->restPostWithHValueUrl",
});
return system.getResult(null, errorMsg);
const stackStr = e.stack ? e.stack : JSON.stringify(e);
this.execClientNew.execLogs(`操作异常-api-center-channel-url:${url}`, pobj, "center-channel-restPostWithHValueUrl", null, stackStr);
return system.getResult(null, stackStr);
}
}
......@@ -111,18 +93,9 @@ class AppServiceBase {
var result = JSON.parse(rtn.stdout);
return result;
} catch (e) {
var errorMsg = "error:" + e.stack;
//日志记录
this.logCtl.error({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/app.base.js/restPostWithHAuthorizationUrl",
content: errorMsg,
// clientIp: pobj.clientIp,
optitle: pobj.opType + "推送操作异常->restPostWithHAuthorizationUrl",
});
return system.getResult(null, errorMsg);
const stackStr = e.stack ? e.stack : JSON.stringify(e);
this.execClientNew.execLogs(`操作异常-api-center-channel-url:${url}`, pobj, "center-channel-restPostWithHAuthorizationUrl", null, stackStr);
return system.getResult(null, stackStr);
}
}
......@@ -135,18 +108,9 @@ class AppServiceBase {
var result = JSON.parse(rtn.stdout);
return result;
} catch (e) {
var errorMsg = "error:" + e.stack;
//日志记录
this.logCtl.error({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/app.base.js/execPostUrl",
content: errorMsg,
// clientIp: pobj.clientIp,
optitle: pobj.opType + "基类操作异常->execPostUrl",
});
return system.getResult(null, errorMsg);
const stackStr = e.stack ? e.stack : JSON.stringify(e);
this.execClientNew.execLogs(`操作异常-api-center-channel-url:${url}`, pobj, "center-channel-restPostWithHAuthorizationUrl", null, stackStr);
return system.getResult(null, stackStr);
}
}
......@@ -177,49 +141,13 @@ class AppServiceBase {
var rtn = await aliyunClient.reqCustomByGet(params);
return rtn;
} catch (e) {
var errorMsg = "error:" + e.stack;
//日志记录
this.logCtl.error({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/utilsSve/opAliyunClientPost.js/opAliyunRpcReq",
content: errorMsg,
// clientIp: pobj.clientIp,
optitle: pobj.opType + "推送操作异常->opAliyunRpcReq",
});
return system.getResult(null, errorMsg);
params.appInfo = pobj.appInfo;
const stackStr = e.stack ? e.stack : JSON.stringify(e);
this.execClientNew.execLogs(`推送操作异常-api-center-channel`, params, "center-channel-opAliyunRpcReq", null, stackStr);
return system.getResult(null, stackStr);
}
}
// /**
// * 阿里RPC调用-post请求
// * @param {*} pobj {action: rpcParam.action,reqbody: pobj.actionBody,rpcParam: rpcParam}
// * @param {*} params {为阿里的接口参数}
// */
// async opAliyunRpcReqByPost(pobj, params) {
// try {
// // var action = obj.action;
// // var reqbody = obj.reqbody;
// // var rpcParam = obj.rpcParam;
// var aliyunClient = system.getObject("util.aliyunClient");
// var rtn = await aliyunClient.reqCustomByPost(params);
// return rtn;
// } catch (e) {
// var errorMsg = "error:" + e.stack;
// //日志记录
// this.logCtl.error({
// appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
// appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
// requestId: pobj.requestId || "",
// op: "service/impl/utilsSve/opAliyunClientPost.js/opAliyunRpcReqByPost",
// content: errorMsg,
// // clientIp: pobj.clientIp,
// optitle: pobj.opType + "推送操作异常->opAliyunRpcReqByPost",
// });
// return system.getResult(null, errorMsg);
// }
// }
/**
* 处理成功后的信息
* @param {*} pobj
......@@ -311,11 +239,11 @@ class AppServiceBase {
}
async getAliossjavaFileUrl(pobj, params) {//上传ali oss 文件调用
var opType = pobj.opType || "";
let opType = pobj.opType || "";
try {
var aliOssFileInfo = await this.execPostUrl(params, settings.aliossjavaUrl());
let aliOssFileInfo = await this.execPostUrl(params, settings.aliossjavaUrl());
if (aliOssFileInfo == true) {
var fileUrl = params.filedir + "/" + params.objectName;
let fileUrl = params.filedir + "/" + params.objectName;
return system.getResultSuccess(fileUrl);
}
this.pushlogSve.createFailLogDb({
......@@ -331,15 +259,9 @@ class AppServiceBase {
});
return system.getResult(null, "java ali oss upload fail");
} catch (e) {
this.logCtl.error({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/app.base.js/getAliossjavaFileUrl",
content: "error:" + e.stack,
// clientIp: pobj.clientIp,
optitle: pobj.opType || "" + "aliossjava-upload阿里上传文件操作异常->getAliossjavaFileUrl",
});
params.appInfo = pobj.appInfo;
const stackStr = e.stack ? e.stack : JSON.stringify(e);
this.execClientNew.execLogs(`aliossjava-upload阿里上传文件操作异常-api-center-channel`, params, "center-channel-getAliossjavaFileUrl", null, stackStr);
return system.getResult(-200, "java ali oss upload error");
}
}
......
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