Commit da83ef25 by 任晓松

360钉钉机器人

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