feat(platform-orders): 清除全部失败标记增加 YES 确认护栏

This commit is contained in:
萝卜
2026-03-10 23:27:05 +00:00
parent 3b59a72d13
commit 429c84bfc2
3 changed files with 21 additions and 2 deletions

View File

@@ -984,10 +984,15 @@ class PlatformOrderController extends Controller
$this->ensurePlatformAdmin($request);
// 支持两种模式:
// - scope=all默认清理所有订单的失败标记
// - scope=all默认清理所有订单的失败标记(需要 confirm=YES
// - scope=filtered仅清理当前筛选结果命中的订单更安全
$scope = (string) $request->input('scope', 'all');
// 防误操作scope=all 需要二次确认
if ($scope === 'all' && (string) $request->input('confirm', '') !== 'YES') {
return redirect()->back()->with('warning', '为避免误操作,清除全部失败标记前请在确认框输入 YES。');
}
$filters = [
'status' => trim((string) $request->input('status', '')),
'payment_status' => trim((string) $request->input('payment_status', '')),