添加put方法刷新locationid
This commit is contained in:
parent
f869935aba
commit
2c79f975e2
@ -524,4 +524,9 @@ http://154.8.214.202:6015/interface/promotion?status=0
|
||||
}
|
||||
|
||||
#### ad_channel 获得接口
|
||||
http://mp.kingsome.cn/api/open/promotion/get-uid?game_id=8002&platform_id=6001
|
||||
http://mp.kingsome.cn/api/open/promotion/get-uid?game_id=8002&platform_id=6001
|
||||
|
||||
|
||||
|
||||
location刷新接口
|
||||
http://154.8.214.202:6015/interface/reflush_adinfo?locationid=1007
|
||||
|
@ -138,6 +138,8 @@ class Location(Resource):
|
||||
if data:
|
||||
condition = f"id='{self.args['id']}'"
|
||||
self.mydb.update("location", location, condition)
|
||||
for locationid in location['id']:
|
||||
self.reflush_location(locationid)
|
||||
return jsonify({'code': 200})
|
||||
else:
|
||||
return jsonify({'code': 404, 'message': f"{self.args['id']} not found in mysql!"})
|
||||
@ -159,3 +161,13 @@ class Location(Resource):
|
||||
log.error(f"location remove {id} failed!", exc_info=True)
|
||||
return jsonify({'code': 500})
|
||||
return jsonify({'code': 200})
|
||||
|
||||
|
||||
def reflush_location(self, locationid):
|
||||
import requests
|
||||
url = f"http://127.0.0.1:6015/interface/reflush_adinfo?locationid={locationid}"
|
||||
r = requests.get(url)
|
||||
if r.status_code == 200:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user