MaiXinRong %!s(int64=2) %!d(string=hai) anos
pai
achega
d1d949dbca
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  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 } });
         }
     }
     /**