Commit ecd42bff by 蒋勇

d

parent 715e0b82
...@@ -255,7 +255,33 @@ class System { ...@@ -255,7 +255,33 @@ class System {
return "localhost"; return "localhost";
} }
}; }
/**
* 记录日志信息
* @param {*} opTitle 操作的标题
* @param {*} params 参数
* @param {*} identifyCode 业务标识
* @param {*} resultInfo 返回结果
* @param {*} errorInfo 错误信息
*/
static execLogs(opTitle, params, identifyCode, resultInfo, errorInfo) {
var reqUrl = settings.logUrl();
var param = {
actionType: "produceLogsData",// Y 功能名称
actionBody: {
opTitle: opTitle || "",// N 操作的业务标题
identifyCode: identifyCode || "brg-center-manage",// Y 操作的业务标识
indexName: "brg-user-center",// Y es索引值,同一个项目用一个值
messageBody: params, //日志的描述信息
resultInfo: resultInfo,//返回信息
errorInfo: errorInfo,//错误信息
requestId: resultInfo.requestId || ""
}
};
this.postJsonTypeReq(reqUrl,param).then(res=>{
console.log(res)
});
}
} }
Date.prototype.Format = function (fmt) { //author: meizz Date.prototype.Format = function (fmt) { //author: meizz
...@@ -323,47 +349,6 @@ module.exports = System; ...@@ -323,47 +349,6 @@ module.exports = System;
// } // }
// })() // })()
/* //System.execLogs("hello",{"opcode":"xxxxx"},"ddfdf",{requestId:'ddds'},null)
地址:http://192.168.1.128:401/api/queueAction/producer/springBoard
//地址:http://192.168.1.128:4019/api/queueAction/producer/springBoard
请求方式:post
参数:
{
"actionType": "produceLogsData",// Y 功能名称
"actionBody": {
"opTitle": "",// N 操作的业务标题
"identifyCode": "logs001",// Y 操作的业务标识
"indexName":"brg-user-center",// Y es索引值,同一个项目用一个值
"messageBody": {//日志的描述信息
"opUrl": "http://192.168.1.189:4012/api/test/testApi/springBoard",// N 操作的业务Url
"message": ""// Y 日志消息描述
},
"resultInfo":"",//返回信息
"errorInfo": ""//错误信息
}
}
返回参数:
{
status: 1, //1为成功,否则为失败
msg: "测试成功",
data: null
}
*/
// let obj= {
// "actionType": "produceLogsData",// Y 功能名称
// "actionBody": {
// "opTitle": "testxx",// N 操作的业务标题
// "identifyCode": "testxx",// Y 操作的业务标识
// "indexName":"brg-center-manage",// Y es索引值,同一个项目用一个值
// "messageBody": {//日志的描述信息
// "opUrl": "http://192.168.1.189:4012/api/test/testApi/springBoard",// N 操作的业务Url
// "message": ""// Y 日志消息描述
// },
// "resultInfo":"",//返回信息
// "errorInfo": ""//错误信息
// }
// }
// System.postJsonTypeReq("http://192.168.1.128:4019/api/queueAction/producer/springBoard",obj).then(r=>{
// console.log(r)
// })
\ No newline at end of file
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