feat(platform-orders): 清除全部失败标记增加 YES 确认护栏
This commit is contained in:
@@ -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', '')),
|
||||
|
||||
Reference in New Issue
Block a user