前台后台一起使用同一个更新工单

This commit is contained in:
2026-05-28 09:48:58 +08:00
parent 0d82bd27b3
commit 02a7a4e518

View File

@@ -118,7 +118,7 @@ class TicketService
* @param $role 当前登录用户角色
* @return array
*/
public function updateTicket($id, $data, $allowFields, $uid, $isSuper = false)
public function updateTicket($id, $data, $allowFields, $isRole, $isSuper = false)
{
$ticket = Tickets::where('id', $id)->find();
@@ -126,14 +126,6 @@ class TicketService
throw new \Exception('工单不存在');
}
// 当不是管理员,进入判断
if (!$isSuper) {
if (!is_null($ticket->user_id) && $ticket->user_id != $uid) {
throw new \Exception('没有权限修改该工单');
}
}
// 提取 $allowFields 允许修改的字段
$updateData = [];
foreach ($allowFields as $field) {