From b6044cd44a0083061b7b4713cef643b7c4fffe73 Mon Sep 17 00:00:00 2001 From: XingQue Date: Fri, 17 Jul 2026 17:01:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B6=E6=AC=BE=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E4=BB=85=E6=8B=A6=E6=88=AA=E8=BF=9B=E8=A1=8C=E4=B8=AD=E8=AE=A2?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 打手佣金/押金收款时,订单状态只拦 Status=2;退款中、结算中等不再拦截;其余资格校验不变。 Co-authored-by: Cursor --- users/tixian_shenhe_services.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/users/tixian_shenhe_services.py b/users/tixian_shenhe_services.py index f0433f7..bdde411 100644 --- a/users/tixian_shenhe_services.py +++ b/users/tixian_shenhe_services.py @@ -65,8 +65,8 @@ logger = logging.getLogger('yonghu.tixian_shenhe') ORDER_STATUS_COMPLETED = 3 ORDER_STATUS_REFUNDED = 5 -# 打手提现申请:仅 jiedan_dashou_id=该用户 且 zhuangtai=2(进行中) 才拦截 -# 1已下单 3已完成 4退款审核中 5已退款 6拒绝退款 7指定中 8结算中 —— 均不拦 +# 打手提现申请 / 收款:仅 PlayerID=该用户 且 Status=2(进行中) 才拦截 +# 退款中(4)、结算中(8) 等不拦 DASHOU_WITHDRAW_APPLY_BLOCKING_ORDER_STATUSES = (2,) LEIXING_RATE_KEY = { @@ -279,7 +279,7 @@ def _dashou_has_unfinished_orders(yonghuid): def _dashou_has_orders_blocking_withdraw_apply(yonghuid): - """打手提现申请:仅拦该用户接单的进行中(2)订单。""" + """打手提现申请/收款:仅拦该用户接单的进行中(Status=2)订单。""" return Order.query.filter( PlayerID=yonghuid, Status__in=DASHOU_WITHDRAW_APPLY_BLOCKING_ORDER_STATUSES, @@ -451,6 +451,7 @@ def validate_collect_eligibility(user_main, leixing): """ 自动提现收款前严格校验(申请时已扣款,不再校余额)。 打手佣金/押金:罚单、封禁、接单中、积分、会员、订单等; + 订单仅拦进行中(2);退款中/结算中等不拦。 不要求手机号/收款码(微信打款到 OpenID)。 """ wx_ok, wx_msg = validate_auto_withdraw_prerequisites(user_main) @@ -480,8 +481,8 @@ def validate_collect_eligibility(user_main, leixing): trial_ok, trial_msg = check_dashou_trial_blocks_commission_withdraw(yonghuid) if not trial_ok: return False, trial_msg - if _dashou_has_unfinished_orders(yonghuid): - return False, '您还有未完成或未退款的订单,无法收款' + if _dashou_has_orders_blocking_withdraw_apply(yonghuid): + return False, '您还有进行中的订单,请完成后再收款' if _dashou_has_open_penalties(yonghuid): return False, '您有未处理完毕的自身罚单,无法收款' return True, '' @@ -500,8 +501,8 @@ def validate_collect_eligibility(user_main, leixing): huiyuan_ok, huiyuan_msg = check_dashou_has_formal_huiyuan_for_withdraw(yonghuid) if not huiyuan_ok: return False, huiyuan_msg - if _dashou_has_unfinished_orders(yonghuid): - return False, '您还有未完成或未退款的订单,无法收款' + if _dashou_has_orders_blocking_withdraw_apply(yonghuid): + return False, '您还有进行中的订单,请完成后再收款' if _dashou_has_open_penalties(yonghuid): return False, '您有未处理完毕的自身罚单,无法收款' return True, ''