Commit 81218644 by 王昆

gsb

parent 7e2d88e8
......@@ -70,6 +70,17 @@ class ActionAPI extends APIBase {
}
result = await this.productSve.getByIds(action_body.ids)
break;
case 'getMapByIds': {
if (!action_body.ids) {
return system.getResult(null, 'id列表不能为空')
}
let list = await this.productSve.getByIds(action_body.ids) || [];
result = {};
for (let item of list) {
result[item.id] = item;
}
break;
}
case 'getItems':
result = await this.productSve.getItems(action_body.id)
break;
......
......@@ -66,6 +66,15 @@ class ProductService extends ServiceBase {
return result
}
async getMapByIds(params) {
if (!params.ids) {
return system.getResult(null, 'id列表不能为空')
}
}
async getItems (id) {
const querys = {
where: { parent_id: id },
......
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