Commit f5267594 authored by Kai's avatar Kai

update

parent 782c974f
......@@ -352,7 +352,7 @@ class TopicUtils(object):
q = dict()
q["query"] = {
"term": {
"user_id": user_id
"id": user_id
}
}
......
......@@ -103,7 +103,7 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
linucb_recommend_topic_id_list = json.loads(recommend_topic_dict[b"data"])
# 推荐帖子是强插的,要保证推荐帖子不在已读里
if linucb_recommend_topic_id_list != None:
if linucb_recommend_topic_id_list != None and have_read_topic_id_list != None:
recommend_topic_id_list = list(set(linucb_recommend_topic_id_list) - set(have_read_topic_id_list))
recommend_topic_id_list.sort(key=linucb_recommend_topic_id_list.index)
# cursor = int(str(recommend_topic_dict[b"cursor"], encoding="utf-8"))
......
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