MaiXinRong 3 years atrás
parent
commit
ad595edae8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/service/stage_change.js

+ 2 - 2
app/service/stage_change.js

@@ -322,8 +322,8 @@ module.exports = app => {
                     '  LEFT JOIN ' + this.ctx.service.stage.tableName + ' s ON scf.sid = s.id' +
                     '  WHERE scf.tid = ? And scf.cid = ? And s.order < ?';
                 const pre = await this.db.query(preSql, [tid, cid, stage.order]);
-                const sql = 'SELECT * FROM ' + this.tableName + ' WHERE sid = ?';
-                const curAll = await this.db.query(sql, [stage.id]);
+                const sql = 'SELECT * FROM ' + this.tableName + ' WHERE sid = ? and cid = ?';
+                const curAll = await this.db.query(sql, [stage.id, cid]);
                 const cur = this.ctx.helper.filterLastestData(curAll, ['lid', 'pid', 'cid', 'cbid'], 'stimes', 'sorder');
                 return [...pre, ...cur];
             }