mirror of
https://gitee.com/270580156/weiyu.git
synced 2025-12-30 10:52:26 +00:00
update
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2025-01-23 14:52:45
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-02-03 08:51:17
|
||||
* @LastEditTime: 2025-02-03 08:57:17
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
@@ -26,6 +26,7 @@ import com.bytedesk.ticket.event.TicketCreateEvent;
|
||||
import com.bytedesk.ticket.event.TicketUpdateEvent;
|
||||
import com.bytedesk.ticket.ticket.TicketEntity;
|
||||
import com.bytedesk.ticket.ticket.TicketRepository;
|
||||
import com.bytedesk.ticket.ticket.TicketTypeEnum;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -51,11 +52,12 @@ public class TicketEventListener {
|
||||
|
||||
// 启动流程时指定租户
|
||||
ProcessInstance processInstance = runtimeService.createProcessInstanceBuilder()
|
||||
.processDefinitionKey(TicketConsts.TICKET_PROCESS_KEY_AGENT)
|
||||
.processDefinitionKey(ticket.getType().equals(TicketTypeEnum.AGENT.name())
|
||||
? TicketConsts.TICKET_PROCESS_KEY_AGENT : TicketConsts.TICKET_PROCESS_KEY_GROUP)
|
||||
.tenantId(ticket.getOrgUid())
|
||||
.variables(variables)
|
||||
.start();
|
||||
|
||||
|
||||
// 设置工单的流程实例ID
|
||||
ticket.setProcessInstanceId(processInstance.getId());
|
||||
ticketRepository.save(ticket);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2025-01-16 14:56:11
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-02-03 08:49:43
|
||||
* @LastEditTime: 2025-02-03 08:55:26
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
@@ -47,7 +47,7 @@ public class TicketEntity extends BaseEntity {
|
||||
@Column(nullable = false)
|
||||
private String title; // 工单标题(必填)
|
||||
|
||||
private String description; // 工单描述
|
||||
private String description; // 工单描述(选填)
|
||||
|
||||
@Builder.Default
|
||||
private String status = TicketStatusEnum.NEW.name(); // 状态(新建/处理中/已解决/已关闭)
|
||||
@@ -55,6 +55,9 @@ public class TicketEntity extends BaseEntity {
|
||||
@Builder.Default
|
||||
private String priority = TicketPriorityEnum.LOW.name(); // 优先级(低/中/高/紧急)
|
||||
|
||||
@Builder.Default
|
||||
private String type = TicketTypeEnum.AGENT.name(); // 类型(agent/group)
|
||||
|
||||
private String threadTopic; // 工单会话主题
|
||||
|
||||
private String categoryUid; // 分类
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2025-01-16 14:58:38
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-01-23 17:15:50
|
||||
* @LastEditTime: 2025-02-03 08:57:50
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
@@ -32,6 +32,8 @@ public class TicketRequest extends BaseRequest {
|
||||
private String status;
|
||||
private String priority;
|
||||
//
|
||||
private String type;
|
||||
//
|
||||
private String threadTopic;
|
||||
private String categoryUid;
|
||||
//
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2025-01-16 14:58:38
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-01-24 13:06:40
|
||||
* @LastEditTime: 2025-02-03 08:57:58
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
@@ -34,6 +34,8 @@ public class TicketResponse extends BaseResponse {
|
||||
private String status;
|
||||
private String priority;
|
||||
//
|
||||
private String type;
|
||||
//
|
||||
private String threadTopic;
|
||||
private String categoryUid;
|
||||
//
|
||||
|
||||
@@ -99,6 +99,9 @@ public class TicketRestService extends BaseRestService<TicketEntity, TicketReque
|
||||
Optional<AgentEntity> assigneeOptional = agentRestService.findByUid(request.getAssigneeUid());
|
||||
if (assigneeOptional.isPresent()) {
|
||||
ticket.setAssignee(assigneeOptional.get());
|
||||
ticket.setType(TicketTypeEnum.AGENT.name());
|
||||
} else {
|
||||
ticket.setType(TicketTypeEnum.GROUP.name());
|
||||
}
|
||||
Optional<UserEntity> reporterOptional = userRestService.findByUid(request.getReporterUid());
|
||||
if (reporterOptional.isPresent()) {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2025-02-03 08:55:36
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-02-03 08:55:38
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
|
||||
* contact: 270580156@qq.com
|
||||
*
|
||||
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.ticket.ticket;
|
||||
|
||||
public enum TicketTypeEnum {
|
||||
AGENT,
|
||||
GROUP
|
||||
}
|
||||
Reference in New Issue
Block a user