This commit is contained in:
2026-08-19 14:14:29 +08:00
parent 30ae8f813d
commit 07a24c5297
11 changed files with 66 additions and 5 deletions

2
app/client/common.php Normal file
View File

@@ -0,0 +1,2 @@
<?php
// 这是系统自动生成的公共文件

View File

@@ -0,0 +1,26 @@
<?php
namespace app\client\controller;
use app\BaseController;
use app\index\service\ClientTicketService;
use think\facade\Session;
class Index extends BaseController
{
/**
* 获取客户关联工单
*/
public function fetchTickets(ClientTicketService $ClientTicketService)
{
$clientCompanyId = (int) Session::get('user_info.company_id'); // 获取当前登录客户ID
$canViewAll = Session::get('user_info.role') === 'client'
&& (bool) Session::get('user_info.can_view_all_tickets');
try {
$tickets = $ClientTicketService->getClientTickets($clientCompanyId, $canViewAll);
return $this->success('获取成功', $tickets);
} catch (\Exception $e) {
return $this->error($e->getMessage());
}
}
}

5
app/client/event.php Normal file
View File

@@ -0,0 +1,5 @@
<?php
// 这是系统自动生成的event定义文件
return [
];

View File

@@ -0,0 +1,5 @@
<?php
// 这是系统自动生成的middleware定义文件
return [
];