Commit ef90c6fd authored by lixiaofang's avatar lixiaofang

add

parent 98e4ffae
...@@ -42,7 +42,7 @@ def get_discover_page_topic_ids(user_id,device_id,size,query_type=TopicPageType. ...@@ -42,7 +42,7 @@ def get_discover_page_topic_ids(user_id,device_id,size,query_type=TopicPageType.
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return [] return []
def get_home_recommend_topic_ids(tag_id,user_id,device_id,offset,size,query=None,query_type=TopicPageType.HOME_RECOMMEND): def get_home_recommend_topic_ids(user_id,device_id,tag_id,offset,size,query=None,query_type=TopicPageType.HOME_RECOMMEND):
try: try:
if query is None: if query is None:
if user_id == -1: if user_id == -1:
...@@ -154,7 +154,7 @@ def home_recommend(device_id="",user_id=-1,offset=0,size=10,query_type=TopicPage ...@@ -154,7 +154,7 @@ def home_recommend(device_id="",user_id=-1,offset=0,size=10,query_type=TopicPage
if not isinstance(device_id,str): if not isinstance(device_id,str):
device_id = "" device_id = ""
recommend_topic_ids = get_home_recommend_topic_ids(user_id,device_id,offset=0,size=size,query_type=query_type) recommend_topic_ids = get_home_recommend_topic_ids(user_id,device_id,tag_id=0,offset=0,size=size,query_type=query_type)
return {"recommend_topic_ids":recommend_topic_ids} return {"recommend_topic_ids":recommend_topic_ids}
except: except:
...@@ -203,7 +203,7 @@ def home_query(tag_id="",device_id="",user_id=-1,query="",offset=0,size=10): ...@@ -203,7 +203,7 @@ def home_query(tag_id="",device_id="",user_id=-1,query="",offset=0,size=10):
if not isinstance(device_id,str): if not isinstance(device_id,str):
device_id = "" device_id = ""
recommend_topic_ids = get_home_recommend_topic_ids(tag_id,user_id,device_id,offset,size,query) recommend_topic_ids = get_home_recommend_topic_ids(user_id,device_id,tag_id,offset,size,query)
return {"recommend_topic_ids":recommend_topic_ids} return {"recommend_topic_ids":recommend_topic_ids}
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
......
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