MaiXinRong 2 năm trước cách đây
mục cha
commit
d1d949dbca
1 tập tin đã thay đổi với 2 bổ sung3 xóa
  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 } });
         }
     }
     /**