Commit 8b70c462 by 庄冰

channel

parent 7c8b0d56
......@@ -46,8 +46,8 @@ class ReceiveDataAPI extends APIBase {
async opActionProcess(action_process, action_type, action_body, pobj, req) {
// action_body.app = req.app;
// action_body.user = req.user;
action_body.app = { id: 1, appPayType: "00", appDataOpType: "00" };
action_body.user = { id: 1, app_id: 1, nickname: "测试用户",channelUserId:"channelUserIdtest01" };
// action_body.app = { id: 1, appPayType: "00", appDataOpType: "00" };
// action_body.user = { id: 1, app_id: 1, nickname: "测试用户",channelUserId:"channelUserIdtest01" };
var opResult = null;
switch (action_type) {
// sy
......
......@@ -15,6 +15,7 @@ class OrderTmProductService extends ServiceBase {
this.receiptvoucherDao = system.getObject("db.dborder.receiptvoucherDao");
this.tmofficialDao = system.getObject("db.dbtrademark.tmofficialDao");
this.userDao = system.getObject("db.dbapp.appuserDao");
this.appDao = system.getObject("db.dbapp.appDao");
}
//------------------------------------------创建订单-------------------开始-------------------------
......@@ -598,8 +599,6 @@ class OrderTmProductService extends ServiceBase {
var itemCode = params.itemCode;//产品编码
var tm = params.tm;//增加sourceType || "00";//来源类型:00订单,10需求,20服务商
var apply = params.apply;
var app = params.app;
var user = params.user;
var nclones = params.nclones || null;
var channelOrder = params.channelOrder || null;
var orderType = params.orderType || "dkxd";//订单类型,zzdd: 自主订单,dkxd: 代客下单
......@@ -614,17 +613,17 @@ class OrderTmProductService extends ServiceBase {
if(!order || !order.id){
return system.getResult(null, "未知订单");
}
// //获取渠道用户数据
// var channelUser = await this.userDao.model.findOne({
// where:{channelUserId:order.channelUserId,app_id:order.app_id},
// raw:true,
// attributes:["id","app_id","channelUserId","channelUserName","userMoblie","nickname"]
// });
//获取渠道用户数据
var user = await this.userDao.model.findOne({
where:{channelUserId:order.channelUserId,app_id:order.app_id},
raw:true
});
var app = await this.appDao.model.findOne({
where:{id:order.app_id},
raw:true
});
channelOrder["channelServiceNo"]=order.channelServiceNo;
channelOrder["payTime"]=order.payTime;
// if(channelUser && channelUser.userMobile){
// channelUser["channelUserMobile"]=channelUser.userMobile;
// }
if (!nclones || nclones.length < 1) {
return system.getResult(null, "尼斯大类不能为空");
}
......@@ -668,13 +667,7 @@ class OrderTmProductService extends ServiceBase {
var orderAmount = tm;
orderAmount.salesNum = tm.nclOneCodes.length;
orderAmount.minitermNum = tm.nclCount;
// var orderResult = await self.orderDao.addOrder(ordercode, orderType, user, app, productItem, channelOrder, channelUser, apply, orderAmount, t);
// if (orderResult.status != 0) {
// return orderResult;
// }
// var order = orderResult.data;
var jfcode = await self.getBusUid("jf");
var orderProductObj = {
app_id: user.app_id,//
productType_id: productItem.picUrl,//产品类型Id
......
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