MaiXinRong 2 years ago
parent
commit
d1d949dbca
1 changed files with 2 additions and 3 deletions
  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 } });
         }
     }
     /**