diff --git a/ad_interface_tornado.py b/ad_interface_tornado.py index e0d6453..bcca4a8 100644 --- a/ad_interface_tornado.py +++ b/ad_interface_tornado.py @@ -28,9 +28,7 @@ def send_cache_data(): now = datetime.datetime.today().strftime("%Y-%m-%d %H:%M:%S") all = [] # 添加无天数限定的记录 - get_full_data = f"""select a.id,a.name,a.ad_num,a.ad_title,a.ad_body,a.ad_image,a.jump_param,a.ad_sort," \ - f"a.companyid,a.gameid,a.channelid,a.jump_status,b.area,b.type,b.mode,b.id from ad a,location b where \ - a.locationid=b.id AND a.status=1 AND a.in_used=1 AND begin_time='{BEGIN}' or end_time='{END}'""" + get_full_data = f"""select a.id,a.name,a.ad_num,a.ad_title,a.ad_body,a.ad_image,a.jump_param,a.ad_sort,a.companyid,a.gameid,a.channelid,a.jump_status,b.area,b.type,b.mode,b.id from ad a,location b where a.locationid=b.id AND a.status=1 AND a.in_used=1 AND begin_time='{BEGIN}' or end_time='{END}'""" full_data = mydb.query(get_full_data) if full_data: @@ -47,9 +45,7 @@ def send_cache_data(): log.error("split data failed", exc_info=True) # 添加有天数限定的记录 - get_data_sql = f"""select a.id,a.name,a.ad_num,a.ad_title,a.ad_body,a.ad_image,a.jump_param,\ - a.ad_sort,a.companyid,a.gameid,a.channelid,a.jump_status,b.area,b.type,b.mode,b.id from ad a ,location b \ - where'{now}'>a.begin_time and '{now}'a.begin_time and '{now}'