7983-testToMaster_2438 #2977

Merged
alexm merged 212 commits from 7983-testToMaster_2438 into master 2024-09-17 05:36:47 +00:00
1 changed files with 5 additions and 8 deletions
Showing only changes of commit 6012604946 - Show all commits

View File

@ -128,6 +128,9 @@ module.exports = Self => {
return {[param]: value}; return {[param]: value};
} }
}); });
if (ctx.req.query.showBadDates === 'true')
where['fp.started'] = {gte: Date.vnNew()};
filter = mergeFilters(filter, {where}); filter = mergeFilters(filter, {where});
const stmts = []; const stmts = [];
@ -184,14 +187,8 @@ module.exports = Self => {
} }
} }
} }
if (ctx.req.query.showBadDates === 'true') {
stmt.merge({ stmt.merge(conn.makeSuffix(filter));
sql: ` WHERE
fp.started> util.VN_CURDATE() `});
} else
stmt.merge(conn.makeWhere(filter.where));
stmt.merge(conn.makeOrderBy(filter.order));
stmt.merge(conn.makeLimit(filter));
const fixedPriceIndex = stmts.push(stmt) - 1; const fixedPriceIndex = stmts.push(stmt) - 1;
const sql = ParameterizedSQL.join(stmts, ';'); const sql = ParameterizedSQL.join(stmts, ';');
const result = await conn.executeStmt(sql, myOptions); const result = await conn.executeStmt(sql, myOptions);