Commit 91398572 authored by Hsinli's avatar Hsinli

addd

parent 75de9b19
Pipeline #12194 passed with stage
in 21 seconds
...@@ -395,14 +395,14 @@ class ToolController extends Controller { ...@@ -395,14 +395,14 @@ class ToolController extends Controller {
attributes: ['id'] attributes: ['id']
} }
let cityCode = await ctx.blockModel.HouseQuestion.findAll(filter); let cityCode = await ctx.blockModel.HouseQuestion.findAll(filter);
let ret = []; let ret = { results: [] };
if (cityCode !== undefined && cityCode.length > 0) { if (cityCode !== undefined && cityCode.length > 0) {
let cityCodes = _.uniq(_.map(cityCode, 'id')); let cityCodes = _.uniq(_.map(cityCode, 'id'));
let cityFilter = { let cityFilter = {
where: { code: { $in: cityCodes } } where: { code: { $in: cityCodes } }
} }
let cityName = await ctx.blockModel.City.findAll(cityFilter); let cityName = await ctx.blockModel.City.findAll(cityFilter);
ret = cityName !== undefined ? cityName : []; ret.results = cityName !== undefined ? cityName : [];
} }
ctx.success(ret); ctx.success(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