Commit ff8d3ead by linboxuan

lin tj

parent 511cdbc9
...@@ -141,6 +141,7 @@ class Dao { ...@@ -141,6 +141,7 @@ class Dao {
} }
async findAndCountAll(qobj, t) { async findAndCountAll(qobj, t) {
var qc = this.buildQuery(qobj); var qc = this.buildQuery(qobj);
console.log(qc);
var apps = await this.model.findAndCountAll(qc); var apps = await this.model.findAndCountAll(qc);
return apps; return apps;
} }
......
...@@ -80,16 +80,15 @@ class UtilsAppSve extends AppServiceBase { ...@@ -80,16 +80,15 @@ class UtilsAppSve extends AppServiceBase {
pageInfo: {} pageInfo: {}
}; };
if (pobj.actionBody) { if (pobj.actionBody) {
let current = 1;
if (pobj.actionBody.current) {
current = pobj.actionBody.current;
tmpWhere.pageInfo.pageNo = current;
}
if (pobj.actionBody.pageSize) { if (pobj.actionBody.pageSize) {
tmpWhere.pageInfo.pageSize = (current - 1) * pobj.actionBody.pageSize ? (current - 1) * pobj.actionBody.pageSize : 14; tmpWhere.limit = pobj.actionBody.pageSize;
}
if (pobj.actionBody.current) {
let current = pobj.actionBody.current;
tmpWhere.offset = (current - 1) * pobj.actionBody.pageSize;
} }
} }
let result = await this.appDao.findAndCountAll(tmpWhere) let result = await this.appDao.model.findAndCountAll(tmpWhere)
return system.getResultSuccess(result); return system.getResultSuccess(result);
} }
} }
......
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