Commit aacf881d by 王昆

gsb

parent cf1c24b2
...@@ -19,15 +19,15 @@ class SaasinvoiceDao extends Dao { ...@@ -19,15 +19,15 @@ class SaasinvoiceDao extends Dao {
return counts[0].total || 0; return counts[0].total || 0;
} }
async pageByParams(params, startRow, pageSize) { async pageByParams(params) {
var sql = []; var sql = [];
sql.push("SELECT * FROM saas_invoice t1 WHERE 1 = 1 "); sql.push("SELECT * FROM saas_invoice t1 WHERE 1 = 1 ");
this.setCondition(params, sql); this.setCondition(params, sql);
sql.push("ORDER BY t1.id DESC"); sql.push("ORDER BY t1.id DESC");
sql.push("LIMIT :startRow, :pageSize"); sql.push("LIMIT :startRow, :pageSize");
params.startRow = startRow || 0; // params.startRow = startRow || 0;
params.pageSize = pageSize || 10; // params.pageSize = pageSize || 10;
return await this.customQuery(sql.join(" "), params); return await this.customQuery(sql.join(" "), params);
} }
......
...@@ -18,15 +18,15 @@ class SaasinvoiceapplyDao extends Dao { ...@@ -18,15 +18,15 @@ class SaasinvoiceapplyDao extends Dao {
return counts[0].total || 0; return counts[0].total || 0;
} }
async pageByParams(params, startRow, pageSize) { async pageByParams(params) {
var sql = []; var sql = [];
sql.push("SELECT * FROM saas_invoice_apply t1 WHERE 1 = 1 "); sql.push("SELECT * FROM saas_invoice_apply t1 WHERE 1 = 1 ");
this.setCondition(params, sql); this.setCondition(params, sql);
sql.push("ORDER BY t1.id DESC"); sql.push("ORDER BY t1.id DESC");
sql.push("LIMIT :startRow, :pageSize"); sql.push("LIMIT :startRow, :pageSize");
params.startRow = startRow || 0; // params.startRow = startRow || 0;
params.pageSize = pageSize || 10; // params.pageSize = pageSize || 10;
return await this.customQuery(sql.join(" "), params); return await this.customQuery(sql.join(" "), params);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment