Commit a447c569 authored by zhanglu's avatar zhanglu

Merge branch 'feature/virtual_vote_num' into 'dev'

添加点赞数排序

See merge request !218
parents 3665c234 4f9fabf5
...@@ -747,6 +747,18 @@ class TopicUtils(object): ...@@ -747,6 +747,18 @@ class TopicUtils(object):
"order": "desc" "order": "desc"
}, },
}) })
elif sort_by == TOPIC_SEARCH_SORT.VOTE_NUM_AEC:
sort_rule.append({
"total_vote_num": {
"order": "asc"
},
})
elif sort_by == TOPIC_SEARCH_SORT.VOTE_NUM_DESC:
sort_rule.append({
"total_vote_num": {
"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