Commit a4acc642 by 王昆

gsb

parent 7b3a0086
......@@ -4,6 +4,9 @@ var settings = require("../../../../config/settings");
class ActionAPI extends APIBase {
constructor() {
super();
this.iborderSve = system.getObject("service.order.iborderbaseSve");
this.ibdeliverbaseSve = system.getObject("service.order.ibdeliverbaseSve");
this.iborderSve = system.getObject("service.order.iborderSve");
this.iborderdeliverSve = system.getObject("service.order.iborderdeliverSve");
......@@ -43,6 +46,8 @@ class ActionAPI extends APIBase {
case "updOrder":
opResult = await this.iborderSve.apiUpd(action_body);
break;
// -------------------
case "allOrderList":
opResult = await this.iborderSve.apiAllList(action_body);
break;
......@@ -55,6 +60,8 @@ class ActionAPI extends APIBase {
case "byChannelOrderId":
opResult = await this.iborderSve.apiByChannelOrderId(action_body);
break;
case "orderEdit":
opResult = await this.iborderSve.apiEdit(action_body);
break;
......
......@@ -384,6 +384,11 @@ class IborderService extends ServiceBase {
order.mailMobile = this.trim(params.mailMobile);
order.userId = this.trim(params.userId);
// var baseOrder = {};
// baseOrder = await this.baseorderDao.create(baseOrder);
// order.id = baseOrder.id;
order = await this.dao.create(order);
return system.getResultSuccess({
orderNo: order.id
......
......@@ -5,6 +5,26 @@ const moment = require("moment");
class IborderbaseService extends ServiceBase {
constructor() {
super("order", ServiceBase.getDaoName(IborderbaseService));
this.regorderSve = system.getObject("service.order.iborderSve");
this.dkorderSve = system.getObject("service.order.iborderdkSve");
this.dzorderSve = system.getObject("service.order.iborderdzSve");
}
async apiAdd(params) {
try {
// 1注册订单 2代开订单 3代账订单
if (params.productType == 1) {
return regorderSve.apiAdd(params);
} else if (params.productType == 2) {
return dkorderSve.apiAdd(params);
} else if (params.productType == 3) {
return dzorderSve.apiAdd(params);
}
return await this.add(params);
} catch (error) {
console.log(error);
return system.getResult(null, "接口异常");
}
}
}
module.exports = IborderbaseService;
......
......@@ -5,6 +5,15 @@ const moment = require("moment");
class IborderdkService extends ServiceBase {
constructor() {
super("order", ServiceBase.getDaoName(IborderdkService));
this.baseDao = system.getObject("db.order.iborderbaseDao");
}
async addOrder(params) {
var params;
var obj = this.baseDao.create(params);
}
}
......
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