dataLists(new AutoAssignLogLists()); } public function rollback() { $ids = $this->request->post('ids', []); if (!is_array($ids)) { $ids = [$ids]; } $result = AutoAssignLogLogic::rollback($ids, $this->adminId, $this->adminInfo); if ($result === false) { return $this->fail(AutoAssignLogLogic::getError()); } $msg = sprintf('回退成功 %d 条', (int) ($result['success'] ?? 0)); $failed = (int) ($result['failed'] ?? 0); if ($failed > 0) { $msg .= sprintf(',跳过/失败 %d 条', $failed); } // show=0:由前端按 success/failed 明细提示,避免与部分失败警告重复 return $this->success($msg, $result, 1, 0); } }