体验会员拦截审核提现与收款;修复分红0元仍走永久分红
This commit is contained in:
@@ -193,6 +193,19 @@ def check_dashou_has_valid_huiyuan(yonghuid):
|
||||
return False, '您的会员已全部过期,请先续费后再操作'
|
||||
|
||||
|
||||
TRIAL_COMMISSION_WITHDRAW_MSG = (
|
||||
'体验会员期间不可提现佣金,请升级正式会员或待体验到期'
|
||||
)
|
||||
|
||||
|
||||
def check_dashou_trial_blocks_commission_withdraw(yonghuid):
|
||||
"""打手佣金提现/收款:体验会员期内禁止。"""
|
||||
from jituan.services.member_recharge import dashou_in_active_trial_period
|
||||
if dashou_in_active_trial_period(yonghuid):
|
||||
return False, TRIAL_COMMISSION_WITHDRAW_MSG
|
||||
return True, ''
|
||||
|
||||
|
||||
def validate_withdraw_eligibility(user_main, leixing, jine):
|
||||
"""
|
||||
提现申请资格校验(完整基本条件;仅放宽「不限制并行申请笔数」)。
|
||||
@@ -218,6 +231,9 @@ def validate_withdraw_eligibility(user_main, leixing, jine):
|
||||
huiyuan_ok, huiyuan_msg = check_dashou_has_valid_huiyuan(yonghuid)
|
||||
if not huiyuan_ok:
|
||||
return False, huiyuan_msg, {}
|
||||
trial_ok, trial_msg = check_dashou_trial_blocks_commission_withdraw(yonghuid)
|
||||
if not trial_ok:
|
||||
return False, trial_msg, {}
|
||||
if dashou.yue < jine:
|
||||
return False, f'余额不足,当前余额: {dashou.yue}', {}
|
||||
return True, '', {'nicheng': dashou.nicheng or ''}
|
||||
@@ -344,6 +360,9 @@ def validate_collect_eligibility(user_main, leixing):
|
||||
huiyuan_ok, huiyuan_msg = check_dashou_has_valid_huiyuan(yonghuid)
|
||||
if not huiyuan_ok:
|
||||
return False, huiyuan_msg
|
||||
trial_ok, trial_msg = check_dashou_trial_blocks_commission_withdraw(yonghuid)
|
||||
if not trial_ok:
|
||||
return False, trial_msg
|
||||
return True, ''
|
||||
|
||||
if leixing == 5:
|
||||
|
||||
@@ -70,6 +70,7 @@ from .tixian_shenhe_services import (
|
||||
mark_transfer_success, release_collect_quota_for_record,
|
||||
close_audit_wechat_failed, query_wechat_transfer_bill,
|
||||
check_shijidaozhang_within_limit,
|
||||
check_dashou_trial_blocks_commission_withdraw,
|
||||
WX_STATE_FAIL, WX_STATE_SUCCESS, WX_STATE_WAIT, WX_STATE_CANCELING,
|
||||
)
|
||||
from .tixian_shenhe_views import process_audit_collect
|
||||
@@ -2025,9 +2026,9 @@ class TixianShenqingView(APIView):
|
||||
if dashou.yue < jine:
|
||||
return {'code': 13, 'msg': f'余额不足,当前余额: {dashou.yue}'}
|
||||
|
||||
from jituan.services.member_recharge import dashou_in_active_trial_period
|
||||
if dashou_in_active_trial_period(user_main.UserUID):
|
||||
return {'code': 16, 'msg': '体验会员期间不可提现佣金,请升级正式会员或待体验到期'}
|
||||
trial_ok, trial_msg = check_dashou_trial_blocks_commission_withdraw(user_main.UserUID)
|
||||
if not trial_ok:
|
||||
return {'code': 16, 'msg': trial_msg}
|
||||
|
||||
return {'code': 0, 'msg': 'ok', 'data': {'nicheng': dashou.nicheng or ''}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user