Commit 77dbdbc2 authored by 李尚科's avatar 李尚科

option fix

parent e8c141e7
......@@ -113,8 +113,8 @@ class OptionService extends Service {
const { ctx } = this;
const rental_house_developers = await ctx.realestateModel.RentalHouse.findAll({ attributes: ['developer_id'], group: 'developer_id', where: { option_city_code: city_code, status: 'online', valid: 1 } });
const developers_ids = rental_house_developers.map(item => { return item.dataValues.developer_id });
const developers = await ctx.realestateModel.Developer.all({ where: { id: { $in: developers_ids, status: 'online', valid: 1 } } });
const developers_ids = rental_house_developers.map(item => { return item.developer_id });
const developers = await ctx.realestateModel.Developer.all({ where: { id: { $in: developers_ids }, status: 'online', valid: 1 } });
const ret = developers.map(item => { return { id: item.id, name: item.name, image: item.logo, value: item.id } });
return ret;
}
......
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