最新版本

This commit is contained in:
2026-05-26 09:44:21 +08:00
parent 822ed9a099
commit fa41edf857
24 changed files with 597 additions and 163 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace app\index\service;
use app\common\model\User as UserModel;
class ClientTicketService
{
/* 获取客户关联工单 */
public function getClientTickets($clientId)
{
# 查询当前登录用户所对应的工单
$tickets = UserModel::with(['tickets'])->find($clientId);
$newList = [];
foreach ($tickets->tickets as $ticket) {
if (in_array($ticket->status, [0, 1, 2])) {
$ticket->visible(['id', 'website', 'datanum', 'progress', 'status']);
$newList[] = $ticket->toArray();
}
}
return $newList;
}
}