Commit e9355833 authored by 吴升宇's avatar 吴升宇

fix auto reply

parent cf6a8771
......@@ -38,8 +38,8 @@ def get_data(numtime1, numtime2):
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT pictorial_id FROM community_pictorial_topic WHERE is_online=1 and (create_time >= '%s' and create_time < '%s') group by pictorial_id " % (
numtime1, numtime2))
"SELECT id FROM community_pictorial WHERE is_online=1 and (create_time >= '%s' and create_time < '%s') " % (
numtime2, numtime1))
res = cursor.fetchall()
return res and [r for r, in res] or []
......@@ -62,9 +62,6 @@ def batch_handle(pictorial_id_list):
def auto_reply_per_1d_to_pictorial():
# 问题自动增加回答
# todo topic_vote_cnt和community_pictorial_topic
# todo 1天前发的问题:[0-1]个评论 6天前发的问题:[0-1]个评论 这个是什么鬼
# todo 怎么禁止作者评论
pictorial_id_list = []
try:
logging.info("comment offline pictorial")
......
......@@ -14,7 +14,7 @@ def get_data(numtime, numtime2):
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT user_id FROM topic WHERE is_online=1 and (create_time >= '%s' and create_time <= '%s' )" % (
"SELECT id FROM topic WHERE is_online=1 and (create_time >= '%s' and create_time <= '%s' )" % (
numtime2, numtime))
res = cursor.fetchall()
return res and [r for r, in res] or []
......
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