Commit 2a2a6471 by 王悦

center-tmtransaction-service.chaolai

parent 9d5ccd74
......@@ -7,6 +7,7 @@ class GatewaypushlogService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(GatewaypushlogService));
this.execClient = system.getObject("util.execClient");
this.dingClient = system.getObject("util.dingClient");
}
async taskAliIcapi() {
......@@ -31,6 +32,7 @@ class GatewaypushlogService extends ServiceBase {
if (data.success) {
icloginfo.pushStatus = "yts";
} else {
this.dingClient.gatewayPushError(data)
icloginfo.pushtimes += 1;
}
await this.update(icloginfo);
......@@ -39,6 +41,7 @@ class GatewaypushlogService extends ServiceBase {
return system.getResultSuccess();
} catch (error) {
this.dingClient.gatewayPushError({message:"Exception"})
return system.getResultFail(-1,error);
}
}
......
const system = require("../system");
class dingClient {
constructor() {
this.execClient = system.getObject('util.execClient');
this.gatewayurl = "https://oapi.dingtalk.com/robot/send?access_token=2f1ada261ea84f6c621db487ac18d11eba8984202bd82adda8810770a8240572"
}
//推送峰擎异常提醒
async gatewayPushError(err) {
let c = `注意提醒:阿里->推送峰擎异常,老板们加油,加油,加油 !!!${JSON.stringify(err)}`
let t = new Date().toLocaleString()
this.execClient.execPost({
"msgtype": "text",
"text": {"content": t + c}
}, this.gatewayurl).catch(alierr=>{
console.log(alierr)
});
}
}
module.exports = dingClient;
......@@ -121,7 +121,7 @@ var settings = {
if (this.env == "dev") {
return "http://centerTmtransactioon.apps.com:4006/";
} else {
return "http://center-app-service/";
return "http://center-tmtransaction-service/";
}
},
zzzdUrl: function () {
......
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