Commit 7d7b1524 by 王悦

fix 批量推fq单条错误

parent 91d985d6
......@@ -21,30 +21,30 @@ class GatewaypushlogService extends ServiceBase {
}
var self = this;
for (var i = 0; i < count; i++) {
var icloginfo = icloginfos[i];
var requestdata = null;
if (icloginfo && icloginfo.requestjson) {
requestdata = JSON.parse(icloginfo.requestjson);
}
var url = settings.gatewayUrl() + "action/intentionapi/springBoard";
var rtn = await self.execClient.execPost(requestdata, url);
var data = rtn
try {
data = JSON.parse(rtn.stdout);
var icloginfo = icloginfos[i];
var requestdata = null;
if (icloginfo && icloginfo.requestjson) {
requestdata = JSON.parse(icloginfo.requestjson);
}
var url = settings.gatewayUrl() + "action/intentionapi/springBoard";
var rtn = await self.execClient.execPost(requestdata, url);
var data = rtn
data = JSON.parse(rtn.stdout);
if (data.success) {
icloginfo.pushStatus = "yts";
} else {
if (data.errorMsg!="状态错误") {//除1 2 4 11其它状态没处理、返回的状态错误
data.push_url = url
data.api = "center-channel/taskAliIcapi"
this.dingClient.gatewayPushError(data)
}
icloginfo.pushtimes += 1;
}
await this.update(icloginfo);
}catch (e) {
console.error(e)
}
if (data.success) {
icloginfo.pushStatus = "yts";
} else {
if (data.errorMsg!="状态错误") {//除1 2 4 11其它状态没处理、返回的状态错误
data.push_url = url
data.api = "center-channel/taskAliIcapi"
this.dingClient.gatewayPushError(data)
}
icloginfo.pushtimes += 1;
}
await this.update(icloginfo);
}
}
return system.getResultSuccess();
......
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