修复格式错乱

This commit is contained in:
pengtao 2019-09-16 11:08:17 +08:00
parent a28ae9d771
commit aa31f12e1e

View File

@ -105,51 +105,51 @@ class Ad(Resource):
and status={status};""" and status={status};"""
else: else:
sel_sql = f"""select sel_sql = f"""select
id, id,
name, name,
begin_time, begin_time,
end_time, end_time,
ad_num, ad_num,
ad_title, ad_title,
ad_body, ad_body,
ad_image, ad_image,
jump_param, jump_param,
ad_sort, ad_sort,
status, status,
companyid, companyid,
locationid, locationid,
gameid, gameid,
channelid, channelid,
jump_status, jump_status,
ad_property ad_property
from from
ad ad
where where
in_used=1 ;""" in_used=1 ;"""
else: else:
sel_sql = f"""select sel_sql = f"""select
id, id,
name, name,
begin_time, begin_time,
end_time, end_time,
ad_num, ad_num,
ad_title, ad_title,
ad_body, ad_body,
ad_image, ad_image,
jump_param, jump_param,
ad_sort, ad_sort,
status, status,
companyid, companyid,
locationid, locationid,
gameid, gameid,
channelid, channelid,
jump_status, jump_status,
ad_property, ad_property,
from from
ad ad
where where
in_used=1 in_used=1
and id={id}; """ and id={id}; """
data = self.mydb.query(sel_sql) data = self.mydb.query(sel_sql)
log.info(f"sql={sel_sql},data={data}") log.info(f"sql={sel_sql},data={data}")
if data: if data: