diff --git a/handler/ad.py b/handler/ad.py index 7893f07..70fe018 100644 --- a/handler/ad.py +++ b/handler/ad.py @@ -50,7 +50,7 @@ class Ad(Resource): return jsonify({'code': 500, "message": f"请输入必须的游戏ID和位置ID字段,当前获得是{gameid},{localid},{status}"}) now = datetime.datetime.today().strftime("%Y-%m-%d %H:%M:%S") - sel_sql = f"select id,name,begin_time,end_time,ad_num,ad_title,ad_body,ad_image,ad_url,ad_sort from ad where gameid='{gameid}' and locationid='{localid}' and status={status};" + sel_sql = f"select id,name,begin_time,end_time,ad_num,ad_title,ad_body,ad_image,ad_url,ad_sort from ad where gameid={gameid} and locationid={localid} and status={status};" data = mydb.query(sel_sql) log.info(f"sql={sel_sql},data={data}") ad_info = {}