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

modify

parent 31c67025
......@@ -40,7 +40,7 @@ def home_recommend(session_id="",user_id=-1,offset=0,size=10):
have_read_topic_id_tuple = set(json.loads(redis_val_dict[b"have_read_topic_id"]))
for item in topic_id_list:
if item["group_id"] in have_read_group_id_tuple:
unread_topic_id_list.append(item)
unread_topic_id_list.append(item["id"])
else:
if item["id"] not in have_read_topic_id_tuple:
recommend_topic_ids.append(item["id"])
......@@ -101,7 +101,7 @@ def home_query(session_id="",user_id=-1,query="",offset=0,size=10):
have_read_topic_id_tuple = set(json.loads(redis_val_dict[b"have_read_topic_id"]))
for item in topic_id_list:
if item["group_id"] in have_read_group_id_tuple:
unread_topic_id_list.append(item)
unread_topic_id_list.append(item["id"])
else:
if item["id"] not in have_read_topic_id_tuple:
recommend_topic_ids.append(item["id"])
......
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