Commit 8d2d5945 authored by 段英荣's avatar 段英荣

modify

parent aba02471
...@@ -284,3 +284,16 @@ class TopicUtils(object): ...@@ -284,3 +284,16 @@ class TopicUtils(object):
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return [] return []
@classmethod
def get_topic_detail_info(cls,topic_id):
try:
q = dict()
q["query"] = {
"term":{
""
}
}
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return dict()
\ No newline at end of file
...@@ -22,7 +22,10 @@ def query_group(query="",offset=0,size=10): ...@@ -22,7 +22,10 @@ def query_group(query="",offset=0,size=10):
""" """
try: try:
result_dict = GroupUtils.get_group_query_result(query,offset,size) result_dict = GroupUtils.get_group_query_result(query,offset,size)
group_ids_list = [item.id for item in result_dict["hits"]] group_ids_list = []
if len(result_dict["hits"]) > 0:
group_ids_list = [item["_source"]["id"] for item in result_dict["hits"]]
return {"group_ids": group_ids_list} return {"group_ids": group_ids_list}
except: except:
......
...@@ -137,6 +137,9 @@ def topic_detail_page_recommend(user_id=-1,topic_id=-1,topic_group_id=-1,topic_u ...@@ -137,6 +137,9 @@ def topic_detail_page_recommend(user_id=-1,topic_id=-1,topic_group_id=-1,topic_u
""" """
try: try:
user_tag_list = list() user_tag_list = list()
result_dict = TopicUtils.get_topic_detail_recommend(user_id,user_tag_list,topic_group_id,topic_user_id,offset,size) result_dict = TopicUtils.get_topic_detail_recommend(user_id,user_tag_list,topic_group_id,topic_user_id,offset,size)
return {"recommend_topic_ids": []} return {"recommend_topic_ids": []}
......
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