Commit 3fab101e authored by Hsinli's avatar Hsinli

addd

parent 7e6bb087
Pipeline #8746 passed with stage
in 9 seconds
......@@ -51,16 +51,20 @@ class searchHistoryService extends Service {
user_id: ctx.userId,
created_at: { $gt: endDate }
},
group: 'key_word',
order: [['created_at', 'desc']],
}
if (type) {
filter.where.house_style = type;
}
let searchHistoryList = await ctx.realestateModel.SearchHistory.findAll(filter);
let list = searchHistoryList.map(v => { return v.key_word });
if (searchHistoryList.length > 0) {
for (let i in searchHistoryList) {
if (list.indexOf(searchHistoryList[i].key_word) === -1) {
list.push(searchHistoryList[i].key_word);
}
}
}
ctx.logger.info(list);
ret = {
results: list,
count: list.length
......
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