This commit is contained in:
ray zhou
2026-05-29 11:21:40 +08:00
parent 5d6d482efe
commit f71a5c59af
447 changed files with 32245 additions and 116 deletions

View File

@@ -0,0 +1,47 @@
---
name: first_cashout审核类型对齐
overview: 将 `FreeCreditsLogic::buildFirstCashoutWithdrawalInfo` 中写死的 `auditType=1` 改为与正常提现一致的判定流程:金额阈值 + 黑名单/倍率风控强制人工。
todos:
- id: inspect-normal-rule
content: 提炼 WithdrawService 中正常提现 auditType 判定口径(金额+风控)
status: completed
- id: add-first-cash-audit-evaluator
content: 在 FreeCreditsLogic 增加第一档提现 auditType 判定方法
status: completed
- id: wire-build-method
content: 替换 buildFirstCashoutWithdrawalInfo 中写死 auditType 为动态判定
status: completed
- id: run-verification-gate
content: 执行 verify-slot-backend.sh 并检查结果
status: completed
isProject: false
---
# First Cashout 审核类型对齐计划
## 目标
`slot_console` 中第一档独立提现的审核类型判定,从固定自动审核改为与正常提现流程一致,避免风控场景下误走自动审核。
## 现状结论
- 在 [`/Users/ray/Documents/project/www/slot/slot_console/app/api/logic/FreeCreditsLogic.php`](/Users/ray/Documents/project/www/slot/slot_console/app/api/logic/FreeCreditsLogic.php) 的 `buildFirstCashoutWithdrawalInfo()` 里目前写死:`'auditType' => 1`
- 正常提现在 [`/Users/ray/Documents/project/www/slot/slot_console/app/service/WithdrawService.php`](/Users/ray/Documents/project/www/slot/slot_console/app/service/WithdrawService.php) 的 `apply()` 中处理逻辑是:
- 先通过 `getAuditType($amount)``auto_audit_max` 决定自动/人工。
- 再结合 `BlackApiService::status()` 与提现倍率(`totalW / wallet->r` 对比 `recharge_times`)在命中时强制人工(`auditType=2`)。
## 实施方案
1. 在 [`/Users/ray/Documents/project/www/slot/slot_console/app/api/logic/FreeCreditsLogic.php`](/Users/ray/Documents/project/www/slot/slot_console/app/api/logic/FreeCreditsLogic.php) 新增一个“第一档提现审核类型判定”私有方法(复用正常提现判定口径)。
2. 判定方法内对齐正常流程:
- 读取提现配置 `auto_audit_max`,按第一档固定金额(`package->amount_qf` 转展示金额后)先算基础 `auditType`
- 查询黑名单状态,非白名单直接人工审核。
- 白名单时按当前钱包数据计算倍率并与 `recharge_times` 比较,命中则人工审核。
3.`buildFirstCashoutWithdrawalInfo()` 中移除写死值,改为调用新判定方法赋值 `auditType`
4. 保持第一档提现已有业务语义不变(固定金额、`fee=0``bizType` 不改),只修正审核类型来源。
5. 变更后执行门禁校验脚本:`~/.cursor/hooks/verify-slot-backend.sh`,并在结果中确认通过。
## 影响文件
- [`/Users/ray/Documents/project/www/slot/slot_console/app/api/logic/FreeCreditsLogic.php`](/Users/ray/Documents/project/www/slot/slot_console/app/api/logic/FreeCreditsLogic.php)
## 验证要点
- 第一档提现在低金额且白名单情况下:`auditType=1`
- 超过 `auto_audit_max` 或命中黑名单/倍率规则时:`auditType=2`
- 订单申请链路仍可正常调用 `PayService::apply()`,不影响原有字段结构。