Commit b7bd6186 authored by zhanglu's avatar zhanglu

帖子添加时间排序

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