From d06c166478c6f38c5097e4e7da097e2b60e9cdf3 Mon Sep 17 00:00:00 2001 From: pengtao Date: Fri, 19 Jul 2019 17:00:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4AD=20=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/ad.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/handler/ad.py b/handler/ad.py index 214411b..f34f8f6 100644 --- a/handler/ad.py +++ b/handler/ad.py @@ -55,16 +55,16 @@ class Ad(Resource): if not id: if companyid: sel_sql = f"select id,name,begin_time,end_time,ad_num,ad_title,ad_body,ad_image,jump_param,ad_sort," \ - f"status,companyid,locationid,gameid from ad where companyid={companyid};" + f"status,companyid,locationid,gameid,jump_status from ad where companyid={companyid};" elif status or status == 0: sel_sql = f"select id,name,begin_time,end_time,ad_num,ad_title,ad_body,ad_image,jump_param,ad_sort," \ - f"status,companyid,locationid,gameid from ad where status={status};" + f"status,companyid,locationid,gameid,jump_status from ad where 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," \ - f"status,companyid,locationid,gameid from ad ;" + f"status,companyid,locationid,gameid,jump_status from ad ;" else: sel_sql = f"select id,name,begin_time,end_time,ad_num,ad_title,ad_body,ad_image,jump_param,ad_sort," \ - f"status,companyid,locationid,gameid from ad where id={id};" + f"status,companyid,locationid,gameid,jump_status from ad where id={id};" data = self.mydb.query(sel_sql) log.info(f"sql={sel_sql},data={data}") if data: @@ -75,7 +75,7 @@ class Ad(Resource): ad_info['id'], ad_info['name'], ad_info['begin_time'], ad_info['end_time'], ad_info['ad_num'], \ ad_info['ad_title'], ad_info['ad_body'], ad_info['ad_image'], ad_info['jump_param'], ad_info[ 'ad_sort'], ad_info['status'], ad_info['companyid'], ad_info['locationid'], ad_info[ - 'gameid'] = line + 'gameid'],ad_info['jump_status'] = line all.append(ad_info) return jsonify({'code': 200, 'message': all}) except Exception: