add ad
This commit is contained in:
parent
a2f853b64f
commit
8379d0d733
@ -1,6 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
|
||||
"""
|
||||
广告接口
|
||||
get (返回广告明细) params(gameid,localid)output(ad_title,ad_body,ad_image,ad_url)
|
||||
post(新增广告定义) params(name,gameid,localid,start_time,end_time,ad_nums,ad_title,ad_body,ad_image,ad_url,ad_sort,status=unapproved,) output(1,0)
|
||||
put(更新广告配置)params(name,gameid,localid,start_time,end_time,ad_nums,ad_title,ad_body,ad_image,ad_url,ad_sort)output(1,0)
|
||||
delete(删除定义的广告)params()output(1,0)
|
||||
|
||||
"""
|
||||
|
||||
class AD():
|
||||
def __init__(self):
|
||||
|
@ -18,7 +18,7 @@ parser.add_argument('name')
|
||||
parser.add_argument('contact')
|
||||
parser.add_argument('appid')
|
||||
parser.add_argument('appkey')
|
||||
|
||||
parser.add_argument('status')
|
||||
|
||||
# # 操作(put / get / delete)单一资源Todo
|
||||
# shows a single todo item and lets you delete a todo item
|
||||
@ -79,6 +79,7 @@ class Company(Resource):
|
||||
company['contact'] = args['contact']
|
||||
company['appid'] = args['appid']
|
||||
company['appkey'] = args['appkey']
|
||||
company['status'] = args['status']
|
||||
# insert to mysql
|
||||
# update_sql = f"update company set id='{company['id']}',name='{company['name']}',contact='{company[
|
||||
# 'contact']}',appid='{company['appid']}',appkey='{company['appkey']}' where id='{comp_id}';"
|
||||
|
Loading…
x
Reference in New Issue
Block a user