MaiXinRong 2 سال پیش
والد
کامیت
d1d949dbca
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      app/lib/revise_price.js

+ 2 - 3
app/lib/revise_price.js

@@ -190,9 +190,8 @@ class revisePriceCalc {
             }
         }
         if (updateBills.length > 0) {
-            const conn = transaction || this.ctx.sub_db;
-            await conn.updateRows(this.ctx.service.changeAuditList.tableName, updateBills);
-            await conn.update(this.ctx.service.change.tableName, { total_price, positive_tp, negative_tp }, { where: { cid: change.cid } });
+            await transaction.updateRows(this.ctx.service.changeAuditList.tableName, updateBills);
+            await transaction.update(this.ctx.service.change.tableName, { total_price, positive_tp, negative_tp }, { where: { cid: change.cid } });
         }
     }
     /**