wip
This commit is contained in:
@@ -5,6 +5,7 @@ namespace app\admin\controller;
|
||||
|
||||
use app\BaseController;
|
||||
use app\common\model\Tickets;
|
||||
use app\common\service\TicketNotifier;
|
||||
use app\common\service\TicketService;
|
||||
use think\facade\Session;
|
||||
|
||||
@@ -109,8 +110,14 @@ class Ticket extends BaseController
|
||||
$ticket = Tickets::find($id);
|
||||
if (!$ticket) return $this->error('工单不存在');
|
||||
|
||||
return $ticket->delete()
|
||||
? $this->success('删除成功', [])
|
||||
: $this->error('删除失败', []);
|
||||
$deleted = $ticket->delete();
|
||||
if (!$deleted) {
|
||||
return $this->error('删除失败', []);
|
||||
}
|
||||
|
||||
// 通知前端实时刷新(静默,广播服务不可用不影响删除流程)
|
||||
TicketNotifier::notify($id, 'delete');
|
||||
|
||||
return $this->success('删除成功', []);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user