returnsystem.getResult(null,"id can not be empty");
}
varsql="select id,`queued_name`,`identify_code`,`op_title`,`push_content`, `result_info`,`request_id`,`created_at` from x_push_failure_log where id=:id limit 1";
varparams={id:actionBody.id};
vartmpList=awaitthis.customQuery(sql,params);
varitem=null;
if(tmpList&&tmpList.length>0){
item=tmpList[0];
}
if(!item){
returnsystem.getResult(null,"data is empty");
}
if(!item.push_content.pushUrl){
returnsystem.getResult(null,"push_content pushUrl is empty");
}
varresultParam={
actionBody:{
pushUrl:item.push_content.pushUrl,// Y 推送地址
actionType:item.push_content.actionType,// Y 推送地址接收时的功能名称
notifyUrl:item.push_content.notifyUrl,// N 推送成功后通知的Url
identifyCode:item.push_content.identifyCode,// Y 操作的业务标识
messageBody:item.push_content.messageBody,
headData:null//N 请求头信息,Json格式,如:{token:"XXXXXXX"}
}
}
returnsystem.getResultSuccess(resultParam);
}
asyncdelFailureLog(actionBody,req){
if(!actionBody.id){
returnsystem.getResult(null,"id can not be empty");
}
varsql="DELETE from x_push_failure_log where id=:id";