修复格式错乱

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};"""
else:
sel_sql = f"""select
id,
name,
begin_time,
end_time,
ad_num,
ad_title,
ad_body,
ad_image,
jump_param,
ad_sort,
status,
companyid,
locationid,
gameid,
channelid,
jump_status,
ad_property
from
ad
where
in_used=1 ;"""
id,
name,
begin_time,
end_time,
ad_num,
ad_title,
ad_body,
ad_image,
jump_param,
ad_sort,
status,
companyid,
locationid,
gameid,
channelid,
jump_status,
ad_property
from
ad
where
in_used=1 ;"""
else:
sel_sql = f"""select
id,
name,
begin_time,
end_time,
ad_num,
ad_title,
ad_body,
ad_image,
jump_param,
ad_sort,
status,
companyid,
locationid,
gameid,
channelid,
jump_status,
ad_property,
from
ad
where
in_used=1
and id={id}; """
id,
name,
begin_time,
end_time,
ad_num,
ad_title,
ad_body,
ad_image,
jump_param,
ad_sort,
status,
companyid,
locationid,
gameid,
channelid,
jump_status,
ad_property,
from
ad
where
in_used=1
and id={id}; """
data = self.mydb.query(sel_sql)
log.info(f"sql={sel_sql},data={data}")
if data: