Commit 9633b4a3 authored by lixiaofang's avatar lixiaofang

add

parent 7ed1ad81
...@@ -26,7 +26,7 @@ def get_discover_page_topic_ids(user_id,device_id,size,query_type=TopicPageType. ...@@ -26,7 +26,7 @@ def get_discover_page_topic_ids(user_id,device_id,size,query_type=TopicPageType.
have_read_topic_id_list = json.loads(redis_field_val_list[0]) if redis_field_val_list[0] else [] have_read_topic_id_list = json.loads(redis_field_val_list[0]) if redis_field_val_list[0] else []
recommend_topic_ids = [] recommend_topic_ids = []
topic_id_dict = TopicUtils.get_recommend_topic_ids(user_id=user_id, offset=0, size=size,query_type=query_type,filter_topic_id_list=have_read_topic_id_list) topic_id_dict = TopicUtils.get_recommend_topic_ids(tag_id=0,user_id=user_id, offset=0, size=size,query_type=query_type,filter_topic_id_list=have_read_topic_id_list)
for topic_id in topic_id_dict: for topic_id in topic_id_dict:
recommend_topic_ids.append(topic_id) recommend_topic_ids.append(topic_id)
...@@ -303,7 +303,7 @@ def query_topic_by_user_similarity(topic_similarity_score_dict, offset=0, size=1 ...@@ -303,7 +303,7 @@ def query_topic_by_user_similarity(topic_similarity_score_dict, offset=0, size=1
""" """
try: try:
must_topic_id_list = list(topic_similarity_score_dict.keys()) must_topic_id_list = list(topic_similarity_score_dict.keys())
topic_id_dict = TopicUtils.get_recommend_topic_ids(user_id=-1, offset=offset, size=size,must_topic_id_list=must_topic_id_list) topic_id_dict = TopicUtils.get_recommend_topic_ids(tag_id=0,user_id=-1, offset=offset, size=size,must_topic_id_list=must_topic_id_list)
recommend_topic_ids = list(topic_id_dict.keys()) recommend_topic_ids = list(topic_id_dict.keys())
return {"recommend_topic_ids":recommend_topic_ids} return {"recommend_topic_ids":recommend_topic_ids}
......
...@@ -129,7 +129,7 @@ class Command(BaseCommand): ...@@ -129,7 +129,7 @@ class Command(BaseCommand):
def generate_topic_score_detail(self): def generate_topic_score_detail(self):
try: try:
topic_id_dict = TopicUtils.get_recommend_topic_ids(241432787, 0, 500,query_type=TopicPageType.HOME_RECOMMEND,test_score=True) topic_id_dict = TopicUtils.get_recommend_topic_ids(0,241432787, 0, 500,query_type=TopicPageType.HOME_RECOMMEND,test_score=True)
for topic_id in topic_id_dict: for topic_id in topic_id_dict:
offline_score = 0.0 offline_score = 0.0
......
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