Commit 98f5af10 authored by Hsinli's avatar Hsinli

addd

parent 0eb00b36
Pipeline #8883 passed with stage
in 4 seconds
......@@ -46,6 +46,7 @@ class QuestionController extends Controller {
const rule = {
page: { type: 'integer', required: false },
limit: { type: 'integer', required: false },
key_word: { type: 'string', required: false },
city_code: { type: 'integer', required: true },
};
ctx.validate(rule, inputParams);
......
......@@ -44,6 +44,15 @@ class HotQuestionPutService extends Service {
},
order: [['created_at', 'desc']]
}
if (condition.key_word) {//关键词搜索 模糊查询
//增加搜索历史
// let addHistory = {
// type: 1,
// key_word: condition.name
// };
// await ctx.service.house.v2.searchHistory.addSearchHistory(addHistory);
filter.where.question = { $like: '%' + condition.key_word + '%' }
}
let res = await ctx.realestateModel.HotQuestionPut.list(filter);
let ret = {
count: res.count,
......
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