|
...
|
...
|
@@ -232,21 +232,17 @@ class AsideTicketController extends BaseController |
|
|
|
if (empty($project))
|
|
|
|
$this->response('工单项目不存在', Code::USER_MODEL_NOTFOUND_ERROE);
|
|
|
|
|
|
|
|
if (empty($project->association)) {
|
|
|
|
if (empty($project->wechat_group_id)) {
|
|
|
|
$this->response('该工单没有绑定的企微群', Code::USER_MODEL_NOTFOUND_ERROE);
|
|
|
|
}
|
|
|
|
|
|
|
|
$ticket = Tickets::where('project_id', $project->id)
|
|
|
|
->orderBy('id', 'desc')
|
|
|
|
->first();
|
|
|
|
|
|
|
|
$message_push = new MessagePush();
|
|
|
|
$message_push->project_id = $project->table_id;
|
|
|
|
$message_push->friend_id = $project->association->friend_id;
|
|
|
|
$message_push->friend_id = $project->wechat_group_id;
|
|
|
|
$message_push->content_type = 'Link';
|
|
|
|
$message_push->content = json_encode([
|
|
|
|
'title' => '工单查看 - ' . $project->company_name,
|
|
|
|
'desc' => $ticket ? $ticket->title : "工单列表",
|
|
|
|
'title' => "AI协同工单 - " . $project->company_name,
|
|
|
|
'desc' => "可提交新的工单、查询工单进度、AI会同步通知售后人员!",
|
|
|
|
'size' => 0,
|
|
|
|
'thumbSize' => 0,
|
|
|
|
'thumbUrl' => 'https://hub.globalso.com/logocm.png',
|
|
...
|
...
|
@@ -255,11 +251,6 @@ class AsideTicketController extends BaseController |
|
|
|
$message_push->send_time = now();
|
|
|
|
$message_push->type = MessagePush::TYPE_TICKET;
|
|
|
|
$message_push->save();
|
|
|
|
|
|
|
|
if (!empty($ticket)) {
|
|
|
|
$ticket->ding = 1; // 标记为已推送
|
|
|
|
$ticket->save();
|
|
|
|
}
|
|
|
|
$this->response('success', Code::SUCCESS);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|