Commit faa91bdf authored by lixiaofang's avatar lixiaofang

add

parent e7a903b5
...@@ -116,14 +116,16 @@ def auto_click(pk_list): ...@@ -116,14 +116,16 @@ def auto_click(pk_list):
yes_time_str = now.strftime('%Y-%m-%d') yes_time_str = now.strftime('%Y-%m-%d')
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306) pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor() cursor = pc.cursor()
cursor.execute( topic_id_list=[]
"SELECT id,user_id FROM topic WHERE id in " + str( if len(pk_list) > 0:
tuple( cursor.execute(
pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0) and create_time LIKE '%%%%%s%%%%' " % yes_time_str) "SELECT id,user_id FROM topic WHERE id in " + str(
data = cursor.fetchall() tuple(
topic_id_list = list(data) pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0) and create_time LIKE '%%%%%s%%%%' " % yes_time_str)
logging.info("Database version : %s " % topic_id_list) data = cursor.fetchall()
pc.close() topic_id_list = list(data)
logging.info("Database version : %s " % topic_id_list)
pc.close()
if topic_id_list: if topic_id_list:
try: try:
def fun_timer(): def fun_timer():
...@@ -170,15 +172,18 @@ def auto_reply(pk_list): ...@@ -170,15 +172,18 @@ def auto_reply(pk_list):
yes_time_str = now.strftime('%Y-%m-%d') yes_time_str = now.strftime('%Y-%m-%d')
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306) pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor() cursor = pc.cursor()
cursor.execute( topic_id_list =[]
"SELECT id,user_id FROM topic WHERE id in " + str( if len(pk_list) > 0:
tuple( cursor.execute(
pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0) and create_time LIKE '%%%%%s%%%%' " % ( "SELECT id,user_id FROM topic WHERE id in " + str(
yes_time_str)) tuple(
data = cursor.fetchall() pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0) and create_time LIKE '%%%%%s%%%%' " % (
topic_id_list = list(data) yes_time_str))
logging.info("Database version : %s " % topic_id_list) data = cursor.fetchall()
pc.close() topic_id_list = list(data)
logging.info("Database version : %s " % topic_id_list)
pc.close()
if topic_id_list: if topic_id_list:
try: try:
def fun_comment(): def fun_comment():
......
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