fix some error
This commit is contained in:
parent
43ecffc2d9
commit
dc9ea6d743
@ -315,7 +315,7 @@ http://192.168.100.20:8888/ad?name=abc&gameid=1003&locationid=1&ad_title=hello&a
|
||||
| ad_url | string | 是 | 跳转链接 |
|
||||
| begin_time | datetime | 否 | 开始时间,默认是1999-01-01 |
|
||||
| end_time | datetime | 否 | 结束时间,默认是3000-01-01 |
|
||||
| ad_num | int | 否 | 投放次数,默认是-1(无限) |
|
||||
| ad_num | int | 否 | 投放次数,默认是0(次数无限) |
|
||||
| ad_sort | int | 否 | 优先级默认为0 |
|
||||
| status | int | 否 | 默认为0(未审批),1=审批通过,2=审批未通过,3=暂停 |
|
||||
| companyid | int | 是 | 广告提交公司 |
|
||||
|
@ -63,8 +63,7 @@ def send_cache_data():
|
||||
num = my_redis.get(f"{key}:num")
|
||||
if not num:
|
||||
num=0
|
||||
print("num was ",num)
|
||||
if line['num'] != -1 and line['num'] <= num:
|
||||
if line['ad_num'] > 0 and line['ad_num'] <= num:
|
||||
# 该广告已播放达到次数,从缓存中清除
|
||||
my_redis.srem(key, line['id'])
|
||||
# 清理广告详细记录
|
||||
|
Loading…
x
Reference in New Issue
Block a user