|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* This file is part of the mucts.com. |
|
4
|
|
|
* |
|
5
|
|
|
* This source file is subject to the MIT license that is bundled |
|
6
|
|
|
* with this source code in the file LICENSE. |
|
7
|
|
|
* |
|
8
|
|
|
* @version 1.0 |
|
9
|
|
|
* @author herry<[email protected]> |
|
10
|
|
|
* @copyright © 2020 MuCTS.com All Rights Reserved. |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
namespace MuCTS\Sobot\Tickets\SaveTicketReply; |
|
14
|
|
|
|
|
15
|
|
|
/** |
|
16
|
|
|
* Class Request |
|
17
|
|
|
* @property-write string $ticket_title 工单标题 |
|
18
|
|
|
* @method Request ticketTitle(string $ticketTitle) 工单标题 |
|
19
|
|
|
* @property-write string $ticket_content 工单问题描述 |
|
20
|
|
|
* @method Request ticketContent($ticketContent) 工单问题描述 |
|
21
|
|
|
* @property-write string $ticketid 工单ID |
|
22
|
|
|
* @method Request ticketid(string $ticketid) 工单ID |
|
23
|
|
|
* @property-write string $get_ticket_datetime 获取工单信息时间,2019-09-19 13:00:00 (当前时间) |
|
24
|
|
|
* @method Request getTicketDatetime(string $getTicketDatetime) 获取工单信息时间,2019-09-19 13:00:00 (当前时间) |
|
25
|
|
|
* @property-write string $reply_content 工单回复内容 |
|
26
|
|
|
* @method Request replyContent(string $replyContent) 工单回复内容 |
|
27
|
|
|
* @property-write int $reply_type 工单回复类型:0 所有人可见,1 仅坐席可见 |
|
28
|
|
|
* @method Request replyType(int $replyType) 工单回复类型:0 所有人可见,1 仅坐席可见 |
|
29
|
|
|
* @property-write string|null $deal_groupid 受理技能组ID |
|
30
|
|
|
* @method Request dealGroupid(?string $dealGroupid) 受理技能组ID |
|
31
|
|
|
* @property-write string|null $deal_group_name 受理技能组名称 |
|
32
|
|
|
* @method Request dealGroupName(?string $dealGroupName) 受理技能组名称 |
|
33
|
|
|
* @property-write string|null $deal_agentid 受理坐席ID |
|
34
|
|
|
* @method Request dealAgentid(?string $dealAgentid) 受理坐席ID |
|
35
|
|
|
* @property-write string|null $deal_agent_name 受理坐席名称 |
|
36
|
|
|
* @method Request dealAgentName(?string $dealAgentName) 受理坐席名称 |
|
37
|
|
|
* @property-write string $reply_agentid 回复坐席ID,指当前处理回复的坐席 |
|
38
|
|
|
* @method Request replyAgentid(string $replyAgentid) 回复坐席ID,指当前处理回复的坐席 |
|
39
|
|
|
* @property-write string $reply_agent_name 回复坐席名称 |
|
40
|
|
|
* @method Request replyAgentMame(string $replyAgentMame) |
|
41
|
|
|
* @property-write int $ticket_status 工单状态:0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除 |
|
42
|
|
|
* @method Request ticketStatus(int $ticketStatus) |
|
43
|
|
|
* @property-write int $ticket_level 工单优先级:0低,1中,2高,3紧急 |
|
44
|
|
|
* @method Request ticketLevel(int $ticketLevel) |
|
45
|
|
|
* @property-write string|null $reply_file_str 回复附件路径:多个附件,附件之间采用英文分号";"隔开 |
|
46
|
|
|
* @method Request replyFileStr(?string $replyFileStr) |
|
47
|
|
|
* @property-write array|null $copy_agent 抄送坐席,格式:[["agent_name"=>"坐席名称","agent_mail"=>"坐席邮箱"]] |
|
48
|
|
|
* @method Request copyAgent(?array $copyAgent) |
|
49
|
|
|
* @property-write array|null extend_fields 工单自定义字段信息,格式:[["fieldid"=>"自定义字段ID","field_value"=>"自定义字段值"]] |
|
50
|
|
|
* @method Request extendFields(?array $extendFields) |
|
51
|
|
|
* @package MuCTS\Sobot\Tickets\Request |
|
52
|
|
|
*/ |
|
53
|
|
|
class Request extends \MuCTS\Sobot\Contracts\Request |
|
54
|
|
|
{ |
|
55
|
|
|
/** |
|
56
|
|
|
* 追加工单自定义字段信息 |
|
57
|
|
|
* |
|
58
|
|
|
* @param string $fieldid |
|
59
|
|
|
* @param string $fieldValue |
|
60
|
|
|
* @return $this |
|
61
|
|
|
*/ |
|
62
|
|
|
public function pushExtendFieldsItem(string $fieldid, string $fieldValue) |
|
63
|
|
|
{ |
|
64
|
|
|
if (!array_key_exists('extend_fields', $this->param)) { |
|
65
|
|
|
$this->param['extend_fields'] = []; |
|
66
|
|
|
} |
|
67
|
|
|
$this->param['extend_fields'][] = ['fieldid' => $fieldid, 'field_value' => $fieldValue]; |
|
68
|
|
|
return $this; |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* 追加抄送坐席项 |
|
73
|
|
|
* |
|
74
|
|
|
* @param string $agentName |
|
75
|
|
|
* @param string $agentMail |
|
76
|
|
|
* @return $this |
|
77
|
|
|
*/ |
|
78
|
|
|
public function pushCopyAgentItem(string $agentName, string $agentMail) |
|
79
|
|
|
{ |
|
80
|
|
|
if (!array_key_exists('copy_agent', $this->param)) { |
|
81
|
|
|
$this->param['copy_agent'] = []; |
|
82
|
|
|
} |
|
83
|
|
|
$this->param['copy_agent'][] = ['agent_name' => $agentName, 'agent_mail' => $agentMail]; |
|
84
|
|
|
return $this; |
|
85
|
|
|
} |
|
86
|
|
|
} |