Commit fe5719ca by 兰国旗

baidureg

parent 636e2320
//工商注册
var APIBase = require("../../api.base");
var system = require("../../../system");
class BaiduReg extends APIBase {
constructor() {
super();
this.regCenterOrder = system.getObject("service.qcutils.regCenterOrder");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
if (pobj.actionType == 'getPolicyNeedList' || pobj.actionType == 'submitPolicyNeedNotes') {
if (!pobj.userInfo) {
return system.getResult(system.noLogin, "user no login!");
}
if (!pobj.appInfo) {
return system.getResult(system.noLogin, "app is null!");
}
}
var result = await this.opActionProcess(pobj, pobj.actionType, req);
return result;
}
async opActionProcess(pobj, action_type, req) {
console.log("pobj",pobj)
var opResult = null;
switch (action_type) {
case "receiveSolutionPayInfoNew"://接收reg方案状态及支付信息(方案支付后创建订单时调用)
opResult = await this.regCenterOrder.receiveSolutionPayInfoNew(pobj);
break;
case "getItemByChannelSolutionNo"://渠道方案号获取需求详情
opResult = await this.regCenterOrder.getItemByChannelSolutionNo(pobj, pobj.actionBody, req);
break;
case "getRegOrderStatus"://接收订单状态推送 百度reg 2.3
opResult = await this.regCenterOrder.getRegOrderStatus(pobj);
break;
case "addRegSalesmanInfo"://添加业务员信息,用于直接下单的reg订单
opResult = await this.regCenterOrder.addRegSalesmanInfo(pobj);
break;
case "submitRegNeed"://提交需求
opResult = await this.regCenterOrder.submitRegNeed(pobj, pobj.actionBody, req);
break;
case "submitBdRegSolution"://方案提交
opResult = await this.regCenterOrder.submitBdRegSolution(pobj);
break;
case "writeRegCommunicationLog"://新增沟通记录
opResult = await this.regCenterOrder.writeRegCommunicationLog(pobj);
break;
case "queryExpertRegCommunicationLogs"://获取沟通记录
opResult = await this.regCenterOrder.queryExpertRegCommunicationLogs(pobj);
break;
case "updateOrdertatus"://提交交付信息/修改订单状态
opResult = await this.regCenterOrder.updateOrdertatus(pobj);
break;
case "closeBdRegNeed"://需求关闭
opResult = await this.regCenterOrder.closeBdRegNeed(pobj);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = BaiduReg;
\ No newline at end of file
......@@ -123,6 +123,7 @@ class BaseQcService {
console.log('guanbi ns +++',ns)
return system.getResultSuccess(ns);
}
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