Commit 2416b4b6 authored by zhanglu's avatar zhanglu

Merge branch 'feature/searth_topic' into 'master'

帖子添加时间排序

See merge request !93
parents bf09f5e1 b7bd6186
......@@ -506,16 +506,15 @@ class TopicUtils(object):
"""处理排序部分。"""
sort_rule = []
for sort in sorts_by:
if sort == TOPIC_SEARCH_SORT.VOTE_NUM:
sort_rule.append({
"vote_num":{
"order":"desc"
},
"update_time":{
"order":"desc"
},
})
if sorts_by == TOPIC_SEARCH_SORT.VOTE_NUM:
sort_rule.append({
"vote_num":{
"order":"desc"
},
"update_time":{
"order":"desc"
},
})
return sort_rule
......
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