调整位置服务接口
This commit is contained in:
parent
37e5a2fbe3
commit
0f808baf02
@ -56,16 +56,18 @@ 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,channelid,jump_status from ad where companyid={companyid};"
|
||||
f"status,companyid,locationid,gameid,channelid,jump_status from ad where in_used=1 and " \
|
||||
f"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,channelid,jump_status from ad where status={status};"
|
||||
f"status,companyid,locationid,gameid,channelid,jump_status from ad where in_used=1 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," \
|
||||
f"status,companyid,locationid,gameid,channelid,jump_status from ad ;"
|
||||
f"status,companyid,locationid,gameid,channelid,jump_status 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," \
|
||||
f"status,companyid,locationid,gameid,channelid,jump_status from ad where id={id};"
|
||||
f"status,companyid,locationid,gameid,channelid,jump_status 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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user