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

Merge branch 'wsy3' into 'test'

Wsy3

See merge request !562
parents ed4c5eef e4ab53b2
......@@ -17,9 +17,8 @@ def get_commnet_id(numtime, numtime2, content_level_low=0, content_level_top=6):
cursor.execute(
"select t.id from topic t left join user_extra u on t.user_id = u.user_id "
"where u.is_shadow=0 and t.create_time > '%s' and t.create_time < '%s' and t.is_online=1 "
"and t.content_level >= %s and t.content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
"select id from topic where is_shadow!= 1 and create_time > '%s' and create_time < '%s' and is_online=1 "
"and content_level >= %s and content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
res = cursor.fetchall()
......
......@@ -18,9 +18,8 @@ def get_commnet_id(numtime, numtime2, content_level_low=0, content_level_top=6):
# 发贴后
cursor.execute(
"select t.id from topic t left join user_extra u on t.user_id = u.user_id "
"where u.is_shadow=0 and t.create_time > '%s' and t.create_time < '%s' and t.is_online=1 "
"and t.content_level >= %s and t.content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
"select id from topic where is_shadow!= 1 and create_time > '%s' and create_time < '%s' and is_online=1 "
"and content_level >= %s and content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
res = cursor.fetchall()
......
......@@ -16,9 +16,8 @@ def get_commnet_id(numtime, numtime2, content_level_low=0, content_level_top=3):
# 发贴后
cursor.execute(
"select t.user_id from topic t left join user_extra u on t.user_id = u.user_id "
"where u.is_shadow=0 and t.create_time > '%s' and t.create_time < '%s' "
"and t.content_level >= %s and t.content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
"select user_id from topic where is_shadow!= 1 and create_time > '%s' and create_time < '%s' "
"and content_level >= %s and content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
res = cursor.fetchall()
return res and [i for i, in res] or []
......
......@@ -16,11 +16,11 @@ def get_commnet_id(numtime, numtime2):
# 注册后
cursor.execute(
"select a.user_id from account_user a left join user_extra u on a.user_id = u.user_id "
"WHERE a.create_time > '%s' and a.create_time < '%s' and u.is_shadow = 0 " % (numtime, numtime2))
"select a.user_id, u.is_shadow from account_user a left join user_extra u on a.user_id = u.user_id "
"WHERE a.create_time > '%s' and a.create_time < '%s' " % (numtime, numtime2))
res = cursor.fetchall()
return res and [i for i, in res] or []
return res and [i for (i, is_shadow) in res if is_shadow != 1] or []
def batch_handle(auto_follow_list):
......
......@@ -15,19 +15,19 @@ def get_commnet_id(numtime, numtime2, content_level_low=0, content_level_top=6):
# 发贴后
cursor.execute(
"select t.user_id from topic t left join user_extra u on t.user_id = u.user_id "
"where u.is_shadow=0 and t.create_time > '%s' and t.create_time < '%s' "
"and t.content_level >= %s and t.content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
"select user_id from topic where is_shadow!= 1 and create_time > '%s' and create_time < '%s' "
"and content_level >= %s and content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
res_post = cursor.fetchall()
# 注册后
cursor.execute(
"select a.user_id from account_user a left join user_extra u on a.user_id = u.user_id "
"WHERE a.create_time > '%s' and a.create_time < '%s' and u.is_shadow = 0 " % (numtime, numtime2))
"select a.user_id, u.is_shadow from account_user a left join user_extra u on a.user_id = u.user_id "
"WHERE a.create_time > '%s' and a.create_time < '%s' " % (numtime, numtime2))
res_regist = cursor.fetchall()
res_regist = res_regist and [(i,) for (i, is_shadow) in res_regist if is_shadow != 1] or []
res = []
res.extend(res_regist)
......
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