Commit 3def24ac by 宋毅

tj

parent 9ff451d1
......@@ -5,12 +5,16 @@ class AccessAuthAPI extends WEBBase {
super();
this.utilsAuthSve = system.getObject("service.utilsSve.utilsAuthSve");
this.gatewaypushlogSve = system.getObject("service.common.gatewaypushlogSve");
this.utilsPushSve = system.getObject("service.utilsSve.utilsPushSve");
}
async taskAliIcapi(){
var rtn=await this.gatewaypushlogSve.taskAliIcapi();
return rtn;
}
async taskAliIcapi() {
var rtn = await this.gatewaypushlogSve.taskAliIcapi();
return rtn;
}
async taskAgainPushBusInfo(pobj, qobj, req) {//再次推送业务数据
var rtn = await this.utilsPushSve.againPushBusInfo(pobj);
return rtn;
}
}
module.exports = AccessAuthAPI;
\ No newline at end of file
......@@ -66,5 +66,10 @@ class PushlogService extends ServiceBase {
this.dao.create(qobj);
}
}
async delDbById(id) {
var sql = "DELETE FROM `center_channel_pushlog` WHERE id=:id";
var paramWhere = { id: id };
this.customQuery(sql, paramWhere);
}
}
module.exports = PushlogService;
......@@ -16,7 +16,7 @@ class UtilsPushService extends AppServiceBase {
this.pushBusInfo(pobj, opType, 1);
}
async pushBusInfo(pobj, opType, isDelProductInfo) {//推送业务总入口-包括重试
async pushBusInfo(pobj, opType, isDelProductInfo) {//推送业务总入口
var interface_list = pobj.interface_info ? pobj.interface_info : pobj.actionBody.product_info.interface_info;
if (!interface_list) {
return system.getResult(null, "暂无推送配置");
......@@ -30,6 +30,21 @@ class UtilsPushService extends AppServiceBase {
this.reflexAction(element, opType, pobj, isDelProductInfo);
}
}
async againPushBusInfo(pobj) {//再次推送业务总入口-重试
var interface_info = pobj.interface_info ? pobj.interface_info : pobj.actionBody.product_info.interface_info;
if (!interface_info) {
return system.getResult(null, "暂无推送配置");
}
var result = await this.reflexAction(interface_info, pobj.opType, pobj, pobj.isDelProductInfo || 1);
if (result.data != 0) {
return result;
}
await this.pushlogSve.delDbById(Number(pobj.id || 0));
return system.getResultSuccess();
}
async reflexAction(interface_info, opType, pobj, isDelProductInfo) {
var refResult = null;
pobj.interface_info = interface_info;
......
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