Commit d198fdea by 庄冰

updateStausByRefundOrder

parent 91b76d7b
......@@ -67,7 +67,10 @@ class IcAPI extends APIBase {
opResult = await this.needsolutionSve.createSolutionByOrder(pobj);
break;
case "receiveSolutionPayInfo"://接收方案状态及支付信息(方案支付后创建订单时调用)
opResult = await this.needinfoSve.receiveSolutionPayInfo(pobj);
opResult = await this.needsolutionSve.receiveSolutionPayInfo(pobj);
break;
case "updateStausByRefundOrder"://修改退款方案状态
opResult = await this.needsolutionSve.updateStausByRefundOrder(pobj);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
......
......@@ -294,10 +294,10 @@ class NeedsolutionService extends ServiceBase {
}else{
return system.getResultFail(-104,"操作类型有误");
}
var solution_status={"dqr":"待确认","ywc":"已完成","yzf":"已作废"};
solutionContent["deliveryStatus"] = status;
solutionContent["deliveryStatusName"] = solution_status[status];
solutionContent["updated"] = new Date();
// var solution_status={"dqr":"待确认","ywc":"已完成","yzf":"已作废"};
// solutionContent["deliveryStatus"] = status;
// solutionContent["deliveryStatusName"] = solution_status[status];
// solutionContent["updated"] = new Date();
if(ab.note){
solutionContent["notes"] = ab.note;
}
......@@ -435,6 +435,27 @@ class NeedsolutionService extends ServiceBase {
var ns = await this.dao.findOne({ channelSolutionNo: ab.channelSolutionNo,uapp_id:app.uapp_id });
return system.getResultSuccess(ns);
}
//修改退款方案状态
async updateStausByRefundOrder(pobj){
var ab = pobj.actionBody;
var app = pobj.appInfo;
if(!ab.orderNo){
return system.getResultFail(-101,"订单号不能为空");
}
var ns = await this.dao.model.findOne({
where:{orderNo:ab.orderNo},raw:true
});
if(!ns || !ns.id){
return system.getResultFail(-103,"未知方案");
}
var status = "yzf";
var reqObj={
status:status,id:ns.id
};
await this.dao.model.update(reqObj, { where: { id: ns.id }});//修改方案信息
return system.getResultSuccess();
}
}
module.exports = NeedsolutionService;
......
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