diff --git a/app/index/controller/Ticket.php b/app/index/controller/Ticket.php index 8f69e2d..89d40e0 100644 --- a/app/index/controller/Ticket.php +++ b/app/index/controller/Ticket.php @@ -14,13 +14,13 @@ class Ticket extends BaseController public function updateTicket(TicketService $ticketService, $id) { - $adminId = Session::get('id'); // 获取当前登录ID + $isUser = Session::get('user_info.role') === 'user'; // 获取当前登录ID $data = $this->request->post(); $allowFields = ['datanum', 'progress', 'status', 'remark', 'lock_time']; try { - $result = $ticketService->updateTicket($id, $data, $allowFields, $adminId, false); + $result = $ticketService->updateTicket($id, $data, $allowFields, $isUser, false); return json(['code' => 200, 'msg' => '更新成功', 'data' => $result]); } catch (\Exception $e) { return json(['code' => 400, 'msg' => $e->getMessage()]);