Commit 0fa1c0a2 by 王昆

gsb

parent 0de6e9b8
...@@ -10,10 +10,10 @@ class SaasMerchantService extends ServiceBase { ...@@ -10,10 +10,10 @@ class SaasMerchantService extends ServiceBase {
// -----------------------以此间隔,上面为API,下面为service--------------------------------- // -----------------------以此间隔,上面为API,下面为service---------------------------------
async mapByIds(params) { async mapByIds(params) {
if(!params.ids || params.ids.length == 0) { if (!params.ids || params.ids.length == 0) {
return system.getResultSuccess({}); return system.getResultSuccess({});
} }
let rs = this.dao.mapByIds(params.ids); let rs = await this.dao.mapByIds(params.ids, params.attrs);
return system.getResultSuccess(rs); return system.getResultSuccess(rs);
} }
...@@ -189,11 +189,14 @@ class SaasMerchantService extends ServiceBase { ...@@ -189,11 +189,14 @@ class SaasMerchantService extends ServiceBase {
params.pageSize = Number(params.pageSize || 10); params.pageSize = Number(params.pageSize || 10);
params.startRow = (currentPage - 1) * params.pageSize; params.startRow = (currentPage - 1) * params.pageSize;
var page = { count: 0, rows: [] }; var page = {
count: 0,
rows: []
};
page.count = await this.dao.countByCondition(params); page.count = await this.dao.countByCondition(params);
if (page.count == 0) { if (page.count == 0) {
return page; return system.getResultSuccess(page);
} }
page.rows = await this.dao.listByCondition(params) || []; page.rows = await this.dao.listByCondition(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