|
@@ -55,16 +55,18 @@ class WorkOrderDing extends Command |
|
@@ -55,16 +55,18 @@ class WorkOrderDing extends Command |
|
55
|
)->get('https://oa.cmer.com/api/dingding/user/' . $mobile);
|
55
|
)->get('https://oa.cmer.com/api/dingding/user/' . $mobile);
|
|
56
|
if ($response->status() == 200) {
|
56
|
if ($response->status() == 200) {
|
|
57
|
$userid = $response->json()['data']['userid'];
|
57
|
$userid = $response->json()['data']['userid'];
|
|
58
|
- $text = "**您有新的售后工单**<br>";
|
|
|
|
59
|
- $text .= "工单ID:{$log->ticket_id}<br>";
|
|
|
|
60
|
- $text .= "工单类型:<font color='red'>{$log->ticket->title}</font><br>";
|
|
|
|
61
|
- $text .= "项目:{$log->ticket->project->title}<br>";
|
|
|
|
62
|
- $text .= "时间:{$log->created_at}<br>";
|
58
|
+// $text = "**您有新的售后工单**<br>";
|
|
|
|
59
|
+// $text .= "工单ID:{$log->ticket_id}<br>";
|
|
|
|
60
|
+// $text .= "工单类型:<font color='red'>{$log->ticket->title}</font><br>";
|
|
|
|
61
|
+// $text .= "项目:{$log->ticket->project->title}<br>";
|
|
|
|
62
|
+// $text .= "时间:{$log->created_at}<br>";
|
|
63
|
$ding = new DingTalkService();
|
63
|
$ding = new DingTalkService();
|
|
64
|
$resp = $ding->danliao(json_encode([
|
64
|
$resp = $ding->danliao(json_encode([
|
|
65
|
- 'text' => $text,
|
|
|
|
66
|
- 'title' => '售后工单通知',
|
|
|
|
67
|
- ]), [$userid]);
|
65
|
+ 'text' => "您有新的售后工单,请及时处理!",
|
|
|
|
66
|
+ 'title' => 'AI协同工单 - ' . $log->ticket->project->title,
|
|
|
|
67
|
+ 'picUrl' => 'https://hub.globalso.com/logocm.png',
|
|
|
|
68
|
+ 'messageUrl' => 'https://oa.quanqiusou.cn/afterorder?project_id=' . $log->ticket->project->uuid,
|
|
|
|
69
|
+ ]), [$userid], 'sampleLink');
|
|
68
|
$log->ding = 1;
|
70
|
$log->ding = 1;
|
|
69
|
}else
|
71
|
}else
|
|
70
|
$log->ding = 2;
|
72
|
$log->ding = 2;
|