Commit e2fdfef5 by zhaoxiqing

gsb

parent 66a97040
......@@ -41,7 +41,7 @@ class AccountDao extends Dao {
if (!ids || ids.length == 0) {
return result;
}
var list = await this.findListByIds(ids, attrs);
var list = await this.listByIds(ids, attrs);
if (!list || list.length == 0) {
return result;
}
......@@ -52,7 +52,6 @@ class AccountDao extends Dao {
}
}
module.exports = AccountDao;
......@@ -11,13 +11,11 @@ class MerchantDao extends Dao {
return list || [];
}
async findMapByIds(ids, attrs) {
var result = [];
var result = {};
if (!ids || ids.length == 0) {
return result;
}
attrs = attrs || "*";
var sql = "SELECT " + attrs + " FROM e_merchant where id IN (:ids) ";
var list = await this.customQuery(sql, {ids: ids});
......@@ -31,24 +29,6 @@ class MerchantDao extends Dao {
return result;
}
async findMapInIds(ids, attrs) {
var result = [];
if (!ids || ids.length == 0) {
return result;
}
attrs = attrs || "*";
var sql = "SELECT " + attrs + " FROM e_merchant where id IN (:ids) ";
var list = await this.customQuery(sql, {ids: ids});
if (!list || list.length == 0) {
return result;
}
return list;
}
}
module.exports = MerchantDao;
......@@ -126,7 +126,7 @@ class MerchantService extends ServiceBase {
if (params.merchantIds.length == 0) {
return system.getResultFail(-1, "请提供商户ID");
}
var merchantMap = await this.dao.findMapInIds(params.merchantIds);
var merchantMap = await this.dao.findMapByIds(params.merchantIds);
return system.getResultSuccess(merchantMap);
} catch (e) {
......
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