Commit e28e32db authored by 任国军's avatar 任国军
parents 71d536c9 96dcf783
Pipeline #12768 passed with stage
in 20 seconds
......@@ -23,7 +23,7 @@ module.exports = app => {
type: INTEGER,
allowNull: true
},
state: {
valid: {
type: INTEGER,
allowNull: true
},
......
......@@ -541,16 +541,14 @@ class NewHouseService extends Service {
const { ctx } = this;
//所有支持的城市编码
let filter = {
attributes: ['city', 'code', 'price'],
where: {
valid: 1
}
}
let cityPrice = await ctx.realestateModel.NewHouseCityPrice.findAll(filter);
let ret = {};
if (cityPrice !== undefined && cityPrice.length > 0) {
for (let i in cityPrice) {
ret[cityPrice[i].code] = cityPrice[i];
}
let ret = await ctx.realestateModel.NewHouseCityPrice.findAll(filter);
if (ret === undefined && ret.length === 0) {
return [];
}
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