Commit a7f0fa13 authored by lixiaofang's avatar lixiaofang

add

parent b2b82d2e
...@@ -130,12 +130,14 @@ def auto_click(pk_list): ...@@ -130,12 +130,14 @@ def auto_click(pk_list):
if len(pk_list) == 1: if len(pk_list) == 1:
cursor.execute( cursor.execute(
"SELECT id FROM topic WHERE id = " + str( "SELECT id FROM topic WHERE id = " + str(
pk_list[0]) + " and user_id in (select user_id from user_extra where is_shadow = 1)") pk_list[
0]) + " and user_id in (select user_id from user_extra where is_shadow = 0) and create_time LIKE '%%%%%s%%%%'" % yes_time_str)
else: else:
cursor.execute( cursor.execute(
"SELECT id FROM topic WHERE id in " + str( # and create_time LIKE '%%%%%s%%%%'% yes_time_str "SELECT id FROM topic WHERE id in " + str(
tuple(pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 1)") tuple(
pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0 ) and create_time LIKE '%%%%%s%%%%'" % yes_time_str)
data = cursor.fetchall() data = cursor.fetchall()
topic_id_list = list(data) topic_id_list = list(data)
logging.info("Database version : %s " % topic_id_list) logging.info("Database version : %s " % topic_id_list)
...@@ -193,13 +195,14 @@ def auto_reply(pk_list): ...@@ -193,13 +195,14 @@ def auto_reply(pk_list):
if len(pk_list) > 0: if len(pk_list) > 0:
if len(pk_list) == 1: if len(pk_list) == 1:
cursor.execute( cursor.execute(
"SELECT id FROM topic WHERE id = " + str(tuple( # and create_time LIKE '%%%%%s%%%%' "SELECT id FROM topic WHERE id = " + str( #
pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0) ") pk_list[
0]) + " and user_id in (select user_id from user_extra where is_shadow = 0) and create_time LIKE '%%%%%s%%%%' " % yes_time_str)
else: else:
cursor.execute( cursor.execute(
"SELECT id FROM topic WHERE id in " + str(tuple( # and create_time LIKE '%%%%%s%%%%' "SELECT id FROM topic WHERE id in " + str(tuple( # and create_time LIKE '%%%%%s%%%%'
pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0) ") pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0) and and create_time LIKE '%%%%%s%%%%'"%yes_time_str)
data = cursor.fetchall() data = cursor.fetchall()
topic_id_list = list(data) topic_id_list = list(data)
......
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