Commit 92b558ff by 宋毅

tj

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