diff --git a/db/dump/dump.after.sql b/db/dump/dump.after.sql index 7508a36a7..a7de86efc 100644 --- a/db/dump/dump.after.sql +++ b/db/dump/dump.after.sql @@ -1,4 +1,5 @@ CREATE USER 'vn'@'localhost'; +INSERT INTO `ormConfig`(`id`,`selectLimit`) VALUES(1,1000); GRANT SELECT, INSERT, diff --git a/modules/item/back/methods/fixed-price/filter.js b/modules/item/back/methods/fixed-price/filter.js index 838e913bf..f8cbfb5eb 100644 --- a/modules/item/back/methods/fixed-price/filter.js +++ b/modules/item/back/methods/fixed-price/filter.js @@ -186,12 +186,12 @@ module.exports = Self => { } if (ctx.req.query.showBadDates === 'true') { stmt.merge({ - sql: `WHERE - fp.started> util.VN_CURDATE() `}); - } - - 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 sql = ParameterizedSQL.join(stmts, ';'); const result = await conn.executeStmt(sql, myOptions);