Commit a0c2011b authored by 段英荣's avatar 段英荣

modify

parent ac8334fb
...@@ -53,8 +53,8 @@ def home_recommend(session_id="",user_id=-1,offset=0,size=10): ...@@ -53,8 +53,8 @@ def home_recommend(session_id="",user_id=-1,offset=0,size=10):
for have_read_item in redis_field_val_list[2:]: for have_read_item in redis_field_val_list[2:]:
if have_read_item: if have_read_item:
have_read_topic_id_set.union(json.loads(have_read_item)) have_read_topic_id_set.union(json.loads(have_read_item))
if user_id==-1: #if user_id==-1:
topic_id_list = list(set([item["id"] for item in topic_id_list]).difference(have_read_topic_id_set)) # topic_id_list = list(set([item["id"] for item in topic_id_list]).difference(have_read_topic_id_set))
for item in topic_id_list: for item in topic_id_list:
if item["group_id"] in have_read_group_id_set: if item["group_id"] in have_read_group_id_set:
......
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