fix: 打手提现/收款认赠送会员为有效会员资格
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,6 +27,17 @@ def _gift_record_active(record, now=None):
|
||||
return daoqi > now
|
||||
|
||||
|
||||
def user_has_any_active_gift_huiyuan(yonghu_id):
|
||||
"""是否持有任意一条未过期的赠送会员(提现/收款资格用)。"""
|
||||
if not yonghu_id:
|
||||
return False
|
||||
now = timezone.now()
|
||||
for rec in DashouZengsongHuiyuan.query.filter(yonghu_id=yonghu_id):
|
||||
if _gift_record_active(rec, now=now):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def parse_gift_daoqi_time(raw):
|
||||
"""
|
||||
解析到期时间。
|
||||
|
||||
Reference in New Issue
Block a user