|
@@ -103,6 +103,7 @@ module.exports = app => {
|
|
|
const prePays = await this.getStageLastestPays(preStage);
|
|
|
for (const pp of prePays) {
|
|
|
const p = this._.find(pays, {id: pp.pid});
|
|
|
+ if (!p.valid) continue;
|
|
|
stagePays.push({
|
|
|
tid: p.tid, sid: stage.id, pid: p.id,
|
|
|
stimes: stage.times, sorder: 0,
|
|
@@ -497,8 +498,7 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
async cacheOrder(stage, transaction) {
|
|
|
- //const sql = `UPDATE ${this.tableName} sp LEFT JOIN ${this.ctx.service.pay.tableName} p ON sp.pid = p.id SET sp.porder = p.\`order\` Where sp.sid = ? AND p.valid`;
|
|
|
- const sql = `UPDATE ${this.tableName} sp LEFT JOIN ${this.ctx.service.pay.tableName} p ON sp.pid = p.id SET sp.porder = p.\`order\` Where sp.sid = ?`;
|
|
|
+ const sql = `UPDATE ${this.tableName} sp LEFT JOIN ${this.ctx.service.pay.tableName} p ON sp.pid = p.id SET sp.porder = p.\`order\` Where sp.sid = ? AND p.valid`;
|
|
|
await transaction.query(sql, [stage.id]);
|
|
|
}
|
|
|
}
|