调整AD 检查项

This commit is contained in:
pengtao 2019-07-19 17:00:59 +08:00
parent cfd247223c
commit d06c166478

View File

@ -55,16 +55,16 @@ class Ad(Resource):
if not id: if not id:
if companyid: if companyid:
sel_sql = f"select id,name,begin_time,end_time,ad_num,ad_title,ad_body,ad_image,jump_param,ad_sort," \ 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: 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," \ 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: else:
sel_sql = f"select id,name,begin_time,end_time,ad_num,ad_title,ad_body,ad_image,jump_param,ad_sort," \ 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: else:
sel_sql = f"select id,name,begin_time,end_time,ad_num,ad_title,ad_body,ad_image,jump_param,ad_sort," \ 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) 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:
@ -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['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_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[ '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) all.append(ad_info)
return jsonify({'code': 200, 'message': all}) return jsonify({'code': 200, 'message': all})
except Exception: except Exception: