This commit is contained in:
2026-08-05 14:05:08 +08:00
parent 9ffc9687d0
commit e831ce810b
8 changed files with 39 additions and 37 deletions

View File

@@ -16,9 +16,9 @@ class ClientTicket extends BaseController
$clientCompanyId = Session::get('user_info.company_id'); // 获取当前登录客户ID
try {
$tickets = $ClientTicketService->getClientTickets($clientCompanyId);
return json(['code' => 200, 'msg' => '获取成功', 'data' => $tickets]);
return $this->success('获取成功', $tickets);
} catch (\Exception $e) {
return json(['code' => 400, 'msg' => $e->getMessage(), 'data' => null]);
return $this->error($e->getMessage());
}
}
}

View File

@@ -21,9 +21,9 @@ class Ticket extends BaseController
try {
$result = $ticketService->updateTicket($id, $data, $allowFields, $isUser, false);
return json(['code' => 200, 'msg' => '更新成功', 'data' => $result]);
return $this->success('更新成功', $result);
} catch (\Exception $e) {
return json(['code' => 400, 'msg' => $e->getMessage()]);
return $this->error($e->getMessage());
}
}
}