Commit 03c22fdf by linboxuan

lin add /ali/esp/intention/close /ali/esp/intention/submit

parent e09c5a7c
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class edi extends APIBase {
constructor() {
super();
this.centerorderSve = system.getObject("service.common.centerorderSve");
this.utilsOrderSve = system.getObject("service.utilsSve.utilsOrderSve");
this.utilsNeedSve = system.getObject("service.utilsSve.utilsNeedSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = await this.opActionProcess(pobj, pobj.actionType, pobj.actionBody, req);
return result;
}
async opActionProcess(pobj, action_type, action_body, req) {
var opResult = null;
switch (action_type) {
case "submitNeedAliEsp"://支付回调
opResult = await this.utilsNeedSve.submitNeedAliEsp(pobj,pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = edi;
\ No newline at end of file
...@@ -852,6 +852,42 @@ class UtilsNeedService extends AppServiceBase { ...@@ -852,6 +852,42 @@ class UtilsNeedService extends AppServiceBase {
// console.log(a.data); // console.log(a.data);
// return a; // return a;
// } // }
/**
* 2020 0925 lin 新增 阿里文网文 服务商侧提供接口2.1 提交用户需求给服务商
* @param {*} pobj
* @param {*} actionBody
*/
async submitNeedAliEsp(pobj, actionBody) {
var obj = {
"intentionBizId": actionBody.intentionBizId,
"type": actionBody.type,
"description":actionBody.description,
"mobile":actionBody.mobile
}
var res = await this.submitNeed(pobj,obj);
if(res.status == 0) {
return system.getResultSuccess(res.data);
}
return system.getResult(null, res)
}
/**
* 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.2 关闭需求通知服务商
* @param {*} pobj
* @param {*} actionBody
*/
async needCloseAliEsp(pobj, actionBody) {
var obj = {
"intentionBizId": actionBody.intentionBizId,
"mobile":actionBody.mobile
}
var res = await this.needClose(pobj,obj);
if(res.status == 0) {
return system.getResultSuccess(res.data);
}
return system.getResult(null, res)
}
} }
module.exports = UtilsNeedService; module.exports = UtilsNeedService;
......
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