Commit c773cea6 by 孙亚楠

dd

parent e7dddb14
......@@ -118,11 +118,13 @@ class IborderbaseService extends ServiceBase {
}
/**
* 更新base表
* 企服通 推送支付信息接口
* @param {*} params
* id //订单ID
* price //支付金额
* orderpayId //支付id
*
* 所有主表的信息和子表的信息更新 都必须在子实现类中更新
*/
async completedOrderInfo(params, t) {
try {
......@@ -150,18 +152,21 @@ class IborderbaseService extends ServiceBase {
}
// 产品类型 1000注册订单 1010代开订单 1030代账订单
if(_iborderbase.productType=="1000"){
// this.iborderdkSve.updateOrder()
// await this.iborderdkSve.updateOrder()
return system.getResult(null,`暂不支持 此类型商品`);
}else if(_iborderbase.productType=="1010"){
params.status=params.status?this.trim(params.status):"20";
//业务状态 1000待分配 1010办理中 1020办理完成
params.payStatus = params.payStatus?this.trim(params.payStatus):"20";
params.status=params.status?this.trim(params.status):"1010";
//更新订单
await this.iborderdkSve.updateOrder(params);
}else if(_iborderbase.productType=="1030"){
// this.iborderdkSve.updateOrder()
//await this.iborderdkSve.updateOrder()
return system.getResult(null,`暂不支持 此类型商品`);
}else {
return system.getResult(null,`当前订单类型不存在 请联系管理员`);
}
return await this.dao.update(params, t);
return system.getResultSuccess();
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
......
......@@ -313,6 +313,7 @@ class IborderdkService extends ServiceBase {
* id 订单的ID
* price 订单的金额
* status 订单的状态
* orderpay_id 订单的支付Id
*/
async updateOrder(params){
try {
......@@ -334,6 +335,9 @@ class IborderdkService extends ServiceBase {
if(params.price){
updateDate.price = Number(params.price || 0);
}
if(params.price){
updateDate.price = Number(params.price || 0);
}
let self = this;
let res = await this.dao.db.transaction(async t =>{
//更新主表
......
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