Commit e703ccf1 by 宋毅

tj

parent 3e02306c
...@@ -8,57 +8,6 @@ class utilsDeliverSve extends AppServiceBase{ ...@@ -8,57 +8,6 @@ class utilsDeliverSve extends AppServiceBase{
} }
/** /**
* 交付中心推送接口
* @param pobj
* @returns {Promise<*>}
*/
async pushDeliver(pobj){
var verifyResult = await this.verifyParam(pobj.actionBody);
if (verifyResult.status != 0) {
return await this.disposePushResultFail(pobj, verifyResult, "fq->pushAliBusiness2Fq->verifyResult", this.pushlogFailType.FQ);
}
let params = verifyResult.data;
const url = this.centerOrderUrl +"action/tmreview/springBoard";
var result = await this.opClientPost(pobj, url, params);
return await this.disposePushResult(pobj, result, "fq->pushAliBusiness2Fq->result", this.pushlogFailType.FQ);
}
/**
* 推送方法及日志记录
* @param pobj
* @param url
* @param key
* @param secret
* @param params
* @returns {Promise<{msg: *, data, status: number}|{msg: *, data, bizmsg: *|string, status: number}>}
*/
async opClientPost(pobj, url,params) {
try {
var rtn = await this.restClient.execDeliveryPost(params,url);
if (!rtn || !rtn.stdout) {
return system.getResult(null, "restPost data is empty");
}
var result = JSON.parse(rtn.stdout);
if (result.status != 0 ) {
return system.getResult(null, "推送失败,失败原因:" + rtn.errorMsg + ",selfrequestId=" + pobj.requestId + ",requestId=" + rtn.requestId);
}
return system.getResultSuccess(null, "推送成功");
} catch (e) {
//日志记录
this.logCtl.error({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/utilsSve/utilsDeliverSve/opClientPost",
content: "error:" + e.stack,
// clientIp: pobj.clientIp,
optitle: pobj.opType + "推送操作异常->deviler->opClientPost",
});
return system.getResult(null, "推送操作异常->delivery->opClientPost->error:" + e.stack);
}
}
/**
* 参数信息重组 * 参数信息重组
* @param pobj * @param pobj
* @returns {Promise<{msg: *, data, status: number}>} * @returns {Promise<{msg: *, data, status: number}>}
......
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