Commit 0b115482 by 宋毅

tj

parent 98f0b83d
......@@ -370,6 +370,9 @@ class OrderInfoService extends ServiceBase {
if (!item) {
return system.getResult(null, "order data is empty!");
}
if (Number(item.orderStatus) == 1) {
return system.getResult(null, "order status is unpay!");
}
var updateDeliveryInfo = {
orderDeliveryStatus: actionBody.orderDeliveryStatus,
orderDeliveryStatusName: actionBody.orderDeliveryStatusName,
......@@ -412,10 +415,14 @@ class OrderInfoService extends ServiceBase {
}
var sql = null;
if (addi > 0) {
await this.dao.updateByWhere({ orderStatus: 4 }, { where: { id: item.id } });
sql = "INSERT INTO `c_delivery_official_flow` (`sourceOrderNo`,`officialFlow`) VALUE('" +
actionBody.orderNo + "','" + JSON.stringify(updateDeliveryInfo) + "')";
}
else {
if (updateDeliveryInfo.orderDeliveryStatusName == "证件邮寄环节") {
await this.dao.updateByWhere({ orderStatus: 8 }, { where: { id: item.id } });
}
sql = "UPDATE `c_delivery_official_flow` SET officialFlow ='" + JSON.stringify(updateDeliveryInfo) + "' where sourceOrderNo='" + actionBody.orderNo + "'";
}
this.customQuery(sql);
......
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