Commit 9192ab55 authored by 段英荣's avatar 段英荣

modify

parent 54c9164c
...@@ -70,7 +70,7 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query ...@@ -70,7 +70,7 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
recommend_topic_dict = redis_client.hgetall(topic_recommend_redis_key) recommend_topic_dict = redis_client.hgetall(topic_recommend_redis_key)
if b"data" in recommend_topic_dict: if b"data" in recommend_topic_dict:
recommend_topic_id_list = json.loads(recommend_topic_dict[b"data"]) recommend_topic_id_list = json.loads(recommend_topic_dict[b"data"])
cursor = recommend_topic_dict[b"cursor"] cursor = int(str(recommend_topic_dict[b"cursor"], encoding="utf-8"))
if len(recommend_topic_id_list) > (cursor+5): if len(recommend_topic_id_list) > (cursor+5):
recommend_topic_list = recommend_topic_id_list[cursor:cursor+5] recommend_topic_list = recommend_topic_id_list[cursor:cursor+5]
......
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