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: