Commit 2de1926e authored by 段英荣's avatar 段英荣

增加搜索次数>=7的限制

parent 526d7efd
......@@ -178,9 +178,11 @@ class QueryWordAttr(object):
def get_search_query_results_num(cls, name):
try:
total_num = 0
data = StrategyHistoryQueryWords.objects.filter(keyword=name).values("answer_num",
data = StrategyHistoryQueryWords.objects.filter(keyword=name,search_num__lte=7).values("answer_num",
"tractate_num",
"diary_num").first()
if data:
for value in data.values():
total_num += value
return total_num
......
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