getKey(); if (empty($keys)) { return $this->response()->error('请选择要禁用的应用'); } try { // 批量禁用应用 $count = TransferApp::whereIn('id', $keys)->update([ 'is_enabled' => 0, 'updated_at' => now(), ]); return $this->response()->success("成功禁用 {$count} 个应用")->refresh(); } catch (\Exception $e) { return $this->response()->error('禁用失败: ' . $e->getMessage()); } } /** * 确认对话框 */ public function confirm() { return '确定要禁用选中的应用吗?禁用后将无法处理相关订单。'; } }