Commit b716022c authored by Kai's avatar Kai

update

parent a4bb6718
......@@ -27,6 +27,8 @@ def get_discover_page_topic_ids(user_id, device_id, size, query_type=TopicPageTy
redis_field_val_list = redis_client.hmget(redis_key, redis_field_list)
have_read_topic_id_list = json.loads(redis_field_val_list[0]) if redis_field_val_list[0] else []
if have_read_topic_id_list == None:
have_read_topic_id_list = list()
recommend_topic_ids = TopicUtils.get_recommend_topic_ids(user_id=user_id, tag_id=0, offset=0, size=size,single_size=size,
query_type=query_type,
......@@ -118,6 +120,8 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
if linucb_recommend_topic_id_dict is not None and len(recommend_topic_list) >0:
for i in recommend_topic_list:
recommend_topic_user_list.append(linucb_recommend_topic_id_dict[str(i)])
if have_read_topic_id_list == None:
have_read_topic_id_list = list()
# 用户关注标签
redis_tag_data = redis_client.hget("physical:linucb:register_user_tag_info", user_id)
attention_tag_list = json.loads(redis_tag_data) if redis_tag_data else []
......
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