Commit 2138cf7e by 庄冰

接收阿里商标状态

parent eb5fb2a5
......@@ -115,6 +115,9 @@ class OrderAPI extends APIBase {
case "receiveAliTmOrder"://接收阿里商标订单
opResult = await this.orderinfoSve.receiveAliTmOrder(pobj);
break;
case "receiveAliTmStatus"://接收阿里商标状态
opResult = await this.orderinfoSve.receiveAliTmStatus(pobj);
break;
case "receiveAliTmOrderRefund"://接收阿里商标订单退款信息
opResult = await this.orderinfoSve.receiveAliTmOrderRefund(pobj);
break;
......
......@@ -2649,6 +2649,44 @@ class OrderInfoService extends ServiceBase {
}
/**
* 接收阿里商标状态信息
* @param {*} pobj
*/
async receiveAliTmStatus(pobj) {
if (!pobj || !pobj.actionBody) {
return system.getResult(null, "订单参数不能为空,100100");
}
if (!pobj.appInfo) {
return system.getResult(null, "未知用应信息,100200");
}
if (!pobj.userInfo) {
return system.getResult(null, "未知用户信息,100300");
}
if (!pobj.actionBody.channelOrderNo) {
return system.getResult(null, "阿里订单号不能为空,100110");
}
if (!pobj.actionBody.orderStatus) {
return system.getResult(null, "订单状态不能为空,100110");
}
var orderInfo = await this.dao.model.findOne({
attributes: ["id", "channelOrderNo", "payTotalSum"],
where: {channelOrderNo: pobj.actionBody.channelOrderNo, uapp_id: pobj.appInfo.uapp_id}, raw: true
});
if (!orderInfo || !orderInfo.id) {
return system.getResult(null, "阿里订单号:" + pobj.actionBody.channelOrderNo + "的订单不存在,100140");
}
if(pobj.actionBody.orderStatus == 8){//已完成
orderInfo.orderStatus = 8;
await this.dao.update(orderInfo);
return system.getResultSuccess();
}else{
return system.getResult(null, "订单状态有误");
}
}
/***
* 处理渠道退款
* @param pobj
......
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