Commit b3a8e9b4 by 宋毅

渠道增加

parent 747b0365
var APIBase = require("../../api.base"); var APIBase = require("../../api.base");
var system = require("../../../system"); var system = require("../../../system");
var settings = require("../../../../config/settings"); var settings = require("../../../../config/settings");
class IcOrderAPI extends APIBase { class IcOrderAPI extends APIBase {
constructor() { constructor() {
super(); super();
this.orderSve = system.getObject("service.dborder.orderSve"); this.orderSve = system.getObject("service.dborder.orderSve");
} }
/** /**
* 接口跳转-POST请求 * 接口跳转-POST请求
* action_process 执行的流程 * action_process 执行的流程
...@@ -36,6 +38,7 @@ class IcOrderAPI extends APIBase { ...@@ -36,6 +38,7 @@ class IcOrderAPI extends APIBase {
} }
return result; return result;
} }
async opActionProcess(action_process, action_type, action_body, pobj, req) { async opActionProcess(action_process, action_type, action_body, pobj, req) {
action_body.app = req.app; action_body.app = req.app;
action_body.user = req.user; action_body.user = req.user;
...@@ -48,6 +51,17 @@ class IcOrderAPI extends APIBase { ...@@ -48,6 +51,17 @@ class IcOrderAPI extends APIBase {
switch (action_type) { switch (action_type) {
case "addOrderAndDelivery"://创建订单和交付单 case "addOrderAndDelivery"://创建订单和交付单
opResult = await this.orderSve.addOrderAndDelivery(action_body, pobj, req); 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; break;
case "getOrderDetailByOrderNo"://获取订单详情 case "getOrderDetailByOrderNo"://获取订单详情
opResult = system.getResultSuccess(null, "测试成功"); opResult = system.getResultSuccess(null, "测试成功");
...@@ -65,4 +79,5 @@ class IcOrderAPI extends APIBase { ...@@ -65,4 +79,5 @@ class IcOrderAPI extends APIBase {
return opResult; return opResult;
} }
} }
module.exports = IcOrderAPI; module.exports = IcOrderAPI;
\ No newline at end of file
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