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