Commit 5f912172 authored by lixiaofang's avatar lixiaofang

add

parent 1a4522f1
......@@ -67,12 +67,20 @@ class Pictorial(models.Model):
yesterday_begin_time = "%s-%s-%s 00:00:00" % (yesterday.year, yesterday.month, yesterday.day)
yesterday_end_time = "%s-%s-%s 23:59:59" % (yesterday.year, yesterday.month, yesterday.day)
topic_id_list = PictorialTopic.objects.filter(pictorial_id=self.pictorial_id,
create_time__gte=yesterday_begin_time,
create_time__lte=yesterday_end_time)
logging.info("get topic_id_list:%s"%topic_id_list)
topic_num = Topic.filter(content_level__in=("4", "5"), create_time__gte=yesterday_begin_time,
create_time__lte=yesterday_end_time, topic_id_in=topic_id_list).count()
logging.info("get topic_num:%s"%topic_num)
return topic_num
except:
......
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