Commit 4f637eba authored by Hsinli's avatar Hsinli

addd

parent d65199a0
Pipeline #8744 passed with stage
in 12 seconds
...@@ -45,6 +45,7 @@ class searchHistoryService extends Service { ...@@ -45,6 +45,7 @@ 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 = {
limit: 50, limit: 50,
attributes: ['key_word'],
where: { where: {
state: 1, state: 1,
user_id: ctx.userId, user_id: ctx.userId,
...@@ -56,7 +57,7 @@ class searchHistoryService extends Service { ...@@ -56,7 +57,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.aggregate('key_word', '', 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