Commit 92b558ff by 宋毅

tj

parent d896cc06
......@@ -60,10 +60,10 @@ class TmOrderAPI extends APIBase {
switch (action_type) {
// sy
case "updateOrderStatus"://更新订单状态
opResult = await this.orderSve.updateOrderStatus(action_body, req);
opResult = await this.orderSve.updateOrderStatus(action_body, pobj, req);
break;
case "updateOrderPayStatus"://更新订单付款状态
opResult = await this.orderSve.updateOrderStatus(action_body, req);
opResult = await this.orderSve.updateOrderPayStatus(action_body, pobj, req);
break;
case "addOrderAndDelivery"://创建订单和交付单
opResult = await this.orderSve.addOrderAndDelivery(action_body, pobj, req);
......
......@@ -118,8 +118,9 @@ class OrderService extends ServiceBase {
async updateOrderStatus(action_body, pobj, req) {
var setObj = {};
if (pobj.actionProcess == "jd") {
setObj.needNo = pobj.needNo;
setObj.needNoOrderNo = pobj.needNoOrderNo;
setObj.channelServiceNo = action_body.channelServiceNo;
setObj.needNo = action_body.needNo;
setObj.needNoOrderNo = action_body.needNoOrderNo;
}
await this.dao.updateByWhere(setObj, { where: { orderNo: action_body.orderNo } });
return system.getResultSuccess();
......@@ -128,7 +129,7 @@ class OrderService extends ServiceBase {
async updateOrderPayStatus(action_body, pobj, req) {
var payStatus = action_body.payStatus || "dfk";
return await self.db.transaction(async function (t) {
await this.dao.updateByWhere({ orderPayStatus: payStatus, buyerMoblie: action_body.buyerMoblie }, { where: { needNoOrderNo: action_body.needNoOrderNo, app_id: req.app.id } }, t);
await this.dao.updateByWhere({ orderPayStatus: payStatus, buyerMoblie: action_body.buyerMoblie || "" }, { where: { needNoOrderNo: action_body.needNoOrderNo, app_id: req.app.id } }, t);
await this.ordertmproductDao.updateByWhere({ payStatus: payStatus }, { where: { needNoOrderNo: action_body.needNoOrderNo, app_id: req.app.id } }, t);
return system.getResultSuccess();
});
......
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