Commit c1331790 authored by 黄凯's avatar 黄凯

Merge branch 'hk_now' into 'master'

add promote topic filter

See merge request alpha/physical!279
parents 79ecf29a 51f12f10
......@@ -119,12 +119,13 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
have_read_topic_id_list.extend(recommend_topic_list)
have_read_topic_id_list_add_promote = list()
promote_recommend_topic_id_list = list()
have_read_topic_id_list_add_promote.extend(have_read_topic_id_list)
# promote_recommend_topic_id_list = TopicHomeRecommend.objects.using(settings.SLAVE_DB_NAME).filter(
# is_online=1).values_list("topic_id")
# if len(have_read_topic_id_list)>0:
# for topic_id in promote_recommend_topic_id_list:
# have_read_topic_id_list_add_promote.extend(topic_id)
promote_recommend_topic_id_list = TopicHomeRecommend.objects.using(settings.SLAVE_DB_NAME).filter(
is_online=1).values_list("topic_id")
if len(promote_recommend_topic_id_list)>0:
for topic_id in promote_recommend_topic_id_list:
have_read_topic_id_list_add_promote.extend(topic_id)
topic_id_list = list()
rank_topic_id_list = TopicUtils.get_recommend_topic_ids(user_id=user_id, tag_id=tag_id, offset=offset, size=size,
......
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