点单有邀请人的打手强制隐藏式商品,并自动补写扫码标记;未登录打日志便于排查。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -45,13 +45,14 @@ class ShangpinHuoquView(APIView):
|
||||
yonghuid,
|
||||
)
|
||||
return 4
|
||||
# 打手且有邀请人:与扫码同等效果
|
||||
has_inviter = UserDashou.objects.filter(user_id=user.pk).exclude(
|
||||
yaoqingren__isnull=True,
|
||||
).exclude(yaoqingren='').exists()
|
||||
if has_inviter:
|
||||
# 打手且有邀请人:与扫码同等效果;顺带补写扫码标记,避免下次再漏
|
||||
dashou = UserDashou.objects.filter(user_id=user.pk).only('yaoqingren').first()
|
||||
inviter = (dashou.yaoqingren or '').strip() if dashou else ''
|
||||
if inviter:
|
||||
UserMain.objects.filter(pk=user.pk).exclude(guanshi_saoma=1).update(guanshi_saoma=1)
|
||||
logger.info(
|
||||
'点单商品:打手有邀请人,强制隐藏式4 yonghuid=%s',
|
||||
'点单商品:打手有邀请人(%s),强制隐藏式4 yonghuid=%s',
|
||||
inviter,
|
||||
yonghuid,
|
||||
)
|
||||
return 4
|
||||
@@ -60,6 +61,8 @@ class ShangpinHuoquView(APIView):
|
||||
saoma,
|
||||
yonghuid,
|
||||
)
|
||||
else:
|
||||
logger.info('点单商品:未登录/无token,按体验开关筛选')
|
||||
shenhe = get_shangpin_shenhe_zhuangtai()
|
||||
logger.info('点单商品:按体验开关 shenhezhuangtai=%s', shenhe)
|
||||
return shenhe
|
||||
|
||||
Reference in New Issue
Block a user