MaiXinRong 2 years ago
parent
commit
98b8720017
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/lib/revise_price.js

+ 1 - 1
app/lib/revise_price.js

@@ -241,7 +241,7 @@ class revisePriceCalc {
         for (const p of this.common_price_c) {
             if (p.his_rela_cid.length > 0) revisePriceUpdate.push({id: p.id, his_rela_cid: p.his_rela_cid.join(',')});
         }
-        await transaction.updateRows(this.ctx.service.revisePrice.tableName, revisePriceUpdate);
+        if (revisePriceUpdate.length > 0) await transaction.updateRows(this.ctx.service.revisePrice.tableName, revisePriceUpdate);
     }
     async _calcStage(stage, bills, transaction) {
         // 无单价变更不执行