MaiXinRong 2 år sedan
förälder
incheckning
27946b79ff
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      app/service/pay.js

+ 1 - 1
app/service/pay.js

@@ -204,7 +204,7 @@ module.exports = app => {
                 const preStage = await this.ctx.service.stage.getDataByCondition({ tid: stage.tid, order: stage.order - 1});
                 const max = await this.db.query('SELECT MAX(stimes) as stimes, MAX(sorder) as sorder FROM ? WHERE sid = ?', [this.ctx.service.stagePay.tableName, preStage.id]);
                 const resortSql = `UPDATE ${this.tableName} p LEFT JOIN ${this.ctx.service.stagePay.tableName} sp ON p.id === sp.pid`+
-                    '  SET p.`order` = sp.porder WHERE p.tid = ? and sp.sid = ? and sp.stimes = ? and sp.sorder = ?';
+                    '  SET p.`order` = sp.porder WHERE p.tid = ? and p.valid = 1 and sp.sid = ? and sp.stimes = ? and sp.sorder = ?';
                 await transaction.query(resortSql, [stage.tid, preStage.id, max.stimes, max.sorder]);
             }
         }