Commit 24044d4a authored by Hsinli's avatar Hsinli

addd

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