's'
This commit is contained in:
@@ -334,6 +334,7 @@ async def nomadvip_check_vip(user_id: str = ""):
|
|||||||
|
|
||||||
pb = get_pb_client()
|
pb = get_pb_client()
|
||||||
linked_user_id = ""
|
linked_user_id = ""
|
||||||
|
wx_link_email = ""
|
||||||
if not _uid_has_vip(pb, user_id):
|
if not _uid_has_vip(pb, user_id):
|
||||||
# 关键补链:真实 wechat userid 可通过 vip_email_link.anonymous_user_id 关联到会员 user_id
|
# 关键补链:真实 wechat userid 可通过 vip_email_link.anonymous_user_id 关联到会员 user_id
|
||||||
try:
|
try:
|
||||||
@@ -359,8 +360,10 @@ async def nomadvip_check_vip(user_id: str = ""):
|
|||||||
str(wx_link.get("pb_user_id", "")).strip()
|
str(wx_link.get("pb_user_id", "")).strip()
|
||||||
or str(wx_link.get("anonymous_user_id", "")).strip()
|
or str(wx_link.get("anonymous_user_id", "")).strip()
|
||||||
)
|
)
|
||||||
|
wx_link_email = str(wx_link.get("email", "")).strip().lower()
|
||||||
except Exception:
|
except Exception:
|
||||||
linked_user_id = ""
|
linked_user_id = ""
|
||||||
|
wx_link_email = ""
|
||||||
if not linked_user_id or not _uid_has_vip(pb, linked_user_id):
|
if not linked_user_id or not _uid_has_vip(pb, linked_user_id):
|
||||||
logging.info("[payjsapi] check_vip miss user_id=%s vip=False", user_id)
|
logging.info("[payjsapi] check_vip miss user_id=%s vip=False", user_id)
|
||||||
result = {"vip": False}
|
result = {"vip": False}
|
||||||
@@ -368,6 +371,8 @@ async def nomadvip_check_vip(user_id: str = ""):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
email = _get_linked_email_for_user(pb, user_id)
|
email = _get_linked_email_for_user(pb, user_id)
|
||||||
|
if not email and wx_link_email:
|
||||||
|
email = wx_link_email
|
||||||
if not email and linked_user_id:
|
if not email and linked_user_id:
|
||||||
try:
|
try:
|
||||||
link_rec = pb.collection("vip_email_link").get_list(
|
link_rec = pb.collection("vip_email_link").get_list(
|
||||||
|
|||||||
Reference in New Issue
Block a user