Commit da83ef25 by 任晓松

360钉钉机器人

parent 24fb5863
......@@ -1263,7 +1263,7 @@ class UtilsOrderService extends AppServiceBase {
};
this.utils360Sve.pushOrderStatus(pobj);
//钉钉机器人
this.dingClient.gatewayPushByChannel(params.orderNo,"360云商机");
this.dingClient.gatewayPushTo360(params.orderNo);
}
opOrderResult.data = null;
return opOrderResult;
......
......@@ -5,6 +5,7 @@ class dingClient {
this.execClient = system.getObject('util.execClient');
this.gatewayurl = "https://oapi.dingtalk.com/robot/send?access_token=2f1ada261ea84f6c621db487ac18d11eba8984202bd82adda8810770a8240572"
this.businessToFqUrl = "https://oapi.dingtalk.com/robot/send?access_token=9e215f0f1d77980ee6b39e88a82a7c6e5d290775f76d9a8346e97697f8df9788"
this.businessTo360Url = "https://oapi.dingtalk.com/robot/send?access_token=2947bdf6163288a5a5c654640e78ea718d21fcae6601efbb4edd53209abc1c45";
}
//推送峰擎异常提醒
......@@ -22,15 +23,14 @@ class dingClient {
}
//渠道钉钉提醒
async gatewayPushByChannel(orderNo,appName) {
let gatewayUrl = setttings.dingRobot360();
if (settings.env != "dev" && gatewayUrl) {
let c = `注意提醒:${appName}->有订单待处理,订单号${orderNo},老板们加油,加油,加油 !!!`
async gatewayPushTo360(orderNo) {
if (process.env.APP_ENV != "dev") {
let c = `注意提醒:360云商机->有订单待处理,订单号${orderNo},老板们加油,加油,加油 !!!`
let t = new Date().toLocaleString()
this.execClient.execPost({
"msgtype": "text",
"text": {"content": t + c}
}, gatewayUrl).catch(err => {
}, this.businessTo360Url).catch(err => {
console.log(err)
});
}
......
......@@ -450,9 +450,6 @@ var settings = {
// 2020 1119 lin 正式环境已经给出,鲁班发的ip
return "http://139.196.159.202:8980/"
}
},
dingRobot360: function() {
return "https://oapi.dingtalk.com/robot/send?access_token=2947bdf6163288a5a5c654640e78ea718d21fcae6601efbb4edd53209abc1c45";
}
};
module.exports = settings;
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