Commit f3c62cfc authored by Hsinli's avatar Hsinli

addd

parent e95dc36f
Pipeline #8865 passed with stage
in 5 seconds
...@@ -87,24 +87,15 @@ class HotQuestionPutService extends Service { ...@@ -87,24 +87,15 @@ class HotQuestionPutService extends Service {
let filter = { let filter = {
page: condition.page || 1, page: condition.page || 1,
limit: condition.limit || 10, limit: condition.limit || 10,
attributes: ['id', 'question', 'status'],
where: { where: {
user_id: ctx.userId, user_id: ctx.userId,
}, },
order: [['created_at', 'desc']] order: [['created_at', 'desc']]
} }
let res = await ctx.realestateModel.HotQuestionPut.list(filter); let res = await ctx.realestateModel.HotQuestionPut.list(filter);
let list = [];
if (res.count > 0) {
for (let i in res.rows) {
list[i] = {
id: res.rows[i].id,
question: res.rows[i].question,
status: res.rows[i].status,
}
}
}
let ret = { let ret = {
results: list, results: res.rows,
count: list.count count: list.count
} }
return ret; return ret;
......
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