Commit b3a8e9b4 by 宋毅

渠道增加

parent 747b0365
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class IcOrderAPI extends APIBase {
constructor() {
super();
this.orderSve = system.getObject("service.dborder.orderSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
......@@ -36,6 +38,7 @@ class IcOrderAPI extends APIBase {
}
return result;
}
async opActionProcess(action_process, action_type, action_body, pobj, req) {
action_body.app = req.app;
action_body.user = req.user;
......@@ -48,6 +51,17 @@ class IcOrderAPI extends APIBase {
switch (action_type) {
case "addOrderAndDelivery"://创建订单和交付单
opResult = await this.orderSve.addOrderAndDelivery(action_body, pobj, req);
pobj.actionBody.quantity = 1;
pobj.actionBody.channelOrder = {};
pobj.actionBody.channelOrder.channelServiceNo = pobj.actionBody.needNo;
pobj.actionBody.channelOrder.channelOrderNo = pobj.actionBody.needNo;
pobj.actionBody.channelOrder.payTime = new Date();
pobj.actionBody.channelOrder.orderStatus = 2;//订单状态dfk: 1: 待付款, 2: 已付款, 4: 待服务, 8: 已完成
pobj.actionBody.orderContact = {};
pobj.actionBody.orderContact.mobile = pobj.actionBody.buyerMoblie;
pobj.actionBody.orderContact.email = pobj.actionBody.email;
let tmpResult = await this.orderSve.addQifuOrder(pobj, pobj.actionBody, req);
this.execClientNew.execLogs("igirl-channel-addOrderAndDelivery", pobj, "igirl-channel-addOrderAndDelivery", tmpResult, null);
break;
case "getOrderDetailByOrderNo"://获取订单详情
opResult = system.getResultSuccess(null, "测试成功");
......@@ -65,4 +79,5 @@ class IcOrderAPI extends APIBase {
return opResult;
}
}
module.exports = IcOrderAPI;
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
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