工单分类

This commit is contained in:
2025-07-04 13:45:50 +08:00
parent 2be25889ea
commit 3be2ae983c
28 changed files with 900 additions and 8 deletions
+7 -1
View File
@@ -17,9 +17,15 @@ class TicketLogic
public function list($params)
{
$where = [];
if(!empty($params['categorie_id'])){
$where[] = ['categorie_id', '=', $params['categorie_id']];
}
if(!empty($params['status'])){
$where[] = ['status', '=', $params['status']];
}
$size = $params['size'];
$current = $params['current'];
return Ticket::with('attachments')->where($where)->paginate($size, ['*'], 'page', $current);
return Ticket::with('attachments')->where($where)->orderBy('id','desc')->paginate($size, ['*'], 'page', $current);
}
public function add(array $data)
{