Commit 254ad39f authored by 段英荣's avatar 段英荣

modify

parent ccf30506
......@@ -326,3 +326,11 @@ class TopicUtils(object):
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return list()
@classmethod
def get_tag_aggregation_topic_id_list(cls):
try:
return list()
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return list()
\ No newline at end of file
......@@ -167,3 +167,19 @@ def topic_detail_page_recommend(user_id=-1,topic_id=-1,topic_group_id=-1,topic_u
return {"recommend_topic_ids": []}
@bind("physical/search/tag_aggregation")
def tag_aggregation(tag_id, offset, size):
"""
:remark 按标签聚合召回帖子
:param tag_id:
:param offset:
:param size:
:return:
"""
try:
return {"recommend_topic_id": []}
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return {"recommend_topic_id": []}
......@@ -26,16 +26,16 @@ class TagTransfer(object):
if instance.is_online==True and instance.is_deleted==False:
topic_id_list = list()
sql_result_list = TopicTag.objects.filter(tag_id=instance.id,is_online=True).values_list("topic_id",flat=True)
sql_result_list = TopicTag.objects.filter(tag_id=instance.id).values_list("topic_id",flat=True)
for item_id in sql_result_list:
topic_id_list.append(item_id)
time_base_val = datetime.datetime.strftime(datetime.datetime.now()+datetime.timedelta(-7), "%Y-%m-%d")
topic_num = Topic.objects.filter(id__in=topic_id_list,is_online=True,is_deleted=False,create_time__gte=time_base_val).count()
topic_num = Topic.objects.filter(id__in=topic_id_list,create_time__gte=time_base_val).count()
res["near_new_topic_num"] = topic_num
tag_type_sql_list = CommunityTagTypeRelation.objects.filter(tag_id=instance.id,is_online=True,is_deleted=False).values_list("tag_type_id",flat=True)
tag_type_sql_list = CommunityTagTypeRelation.objects.filter(tag_id=instance.id).values_list("tag_type_id",flat=True)
tag_type_list = list()
for tag_type_id in tag_type_sql_list:
tag_type_list.append(tag_type_id)
......
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