Governance: block batch BMPA when renewal missing subscription filter present

This commit is contained in:
萝卜
2026-03-17 01:40:51 +08:00
parent 810c4894fd
commit 6cd8c34245
2 changed files with 43 additions and 0 deletions

View File

@@ -1641,6 +1641,11 @@ class PlatformOrderController extends Controller
'refund_inconsistent' => (string) $request->input('refund_inconsistent', ''),
];
// 防误操作(治理优先):续费单未绑定订阅属于高风险治理集合,不允许执行 BMPA会产生大量失败标记掩盖问题
if ($scope === 'filtered' && ((string) ($filters['renewal_missing_subscription'] ?? '') === '1')) {
return redirect()->back()->with('warning', '当前筛选为「续费单未绑定订阅」治理集合。为避免带病推进,请先完成订阅绑定/修复关联后再执行 BMPA。');
}
// 防误操作:批量“标记支付并生效”默认要求当前筛选口径为「待处理(pending) + 未支付(unpaid)」
if ($scope === 'filtered') {
if (($filters['status'] ?? '') !== 'pending' || ($filters['payment_status'] ?? '') !== 'unpaid') {