Commit 80466dc5 authored by Hsinli's avatar Hsinli

addd

parent 24044d4a
......@@ -44,8 +44,9 @@ class searchHistoryService extends Service {
}
let endDate = moment().subtract(6, 'months').format('YYYY-MM-DD HH:mm:ss');
let filter = {
page: 1,
limit: 50,
attributes: [[sequelize.literal('distinct `key_word`'), 'key_word']],
attributes: [[literal('distinct `key_word`'), 'key_word']],
where: {
state: 1,
user_id: ctx.userId,
......@@ -55,7 +56,7 @@ class searchHistoryService extends Service {
if (type) {
filter.where.house_style = type;
}
let searchHistoryList = await ctx.realestateModel.SearchHistory.findAll(filter);
let searchHistoryList = await ctx.realestateModel.SearchHistory.all(filter);
let list = searchHistoryList.map(v => { return v.key_word });
ctx.logger.info(list);
......
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