mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-21 20:47:52 +00:00
update
This commit is contained in:
@@ -46,8 +46,8 @@ import com.bytedesk.core.socket.stomp.StompDisconnectedEvent;
|
||||
import com.bytedesk.core.socket.stomp.StompSubscribeEvent;
|
||||
import com.bytedesk.core.socket.stomp.StompUnsubscribeEvent;
|
||||
import com.bytedesk.core.thread.ThreadEntity;
|
||||
import com.bytedesk.core.thread.ThreadUpdateEvent;
|
||||
import com.bytedesk.core.thread.event.ThreadCreateEvent;
|
||||
import com.bytedesk.core.thread.event.ThreadUpdateEvent;
|
||||
import com.bytedesk.core.topic.TopicCreateEvent;
|
||||
import com.bytedesk.core.topic.TopicUpdateEvent;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-01-29 16:21:24
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2024-12-25 17:58:04
|
||||
* @LastEditTime: 2024-12-26 10:13:41
|
||||
* @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.
|
||||
@@ -154,6 +154,7 @@ public class ThreadEntity extends BaseEntity {
|
||||
* 技能组客服对话中,存储技能组信息
|
||||
* 机器人对话中,存储机器人信息
|
||||
* 用户私聊、群聊、同事会话中,无需存储,使用owner字段信息
|
||||
* @{UserProtobuf}
|
||||
*/
|
||||
@Builder.Default
|
||||
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.bytedesk.core.quartz.event.QuartzOneMinEvent;
|
||||
import com.bytedesk.core.rbac.user.UserEntity;
|
||||
import com.bytedesk.core.rbac.user.UserUpdateEvent;
|
||||
import com.bytedesk.core.thread.event.ThreadCreateEvent;
|
||||
import com.bytedesk.core.thread.event.ThreadUpdateEvent;
|
||||
import com.bytedesk.core.topic.TopicCacheService;
|
||||
import com.bytedesk.core.topic.TopicRequest;
|
||||
import com.bytedesk.core.topic.TopicService;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-01-29 16:21:24
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2024-12-25 22:30:53
|
||||
* @LastEditTime: 2024-12-26 10:12:56
|
||||
* @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.
|
||||
@@ -46,6 +46,7 @@ import com.bytedesk.core.constant.BytedeskConsts;
|
||||
import com.bytedesk.core.constant.I18Consts;
|
||||
import com.bytedesk.core.rbac.user.UserProtobuf;
|
||||
import com.bytedesk.core.rbac.user.UserUtils;
|
||||
import com.bytedesk.core.thread.event.ThreadAcceptEvent;
|
||||
import com.bytedesk.core.thread.event.ThreadCloseEvent;
|
||||
import com.bytedesk.core.topic.TopicUtils;
|
||||
import com.bytedesk.core.uid.UidUtils;
|
||||
@@ -347,18 +348,17 @@ public class ThreadRestService extends BaseRestService<ThreadEntity, ThreadReque
|
||||
if (!threadOptional.isPresent()) {
|
||||
throw new RuntimeException("accept thread " + threadRequest.getUid() + " not found");
|
||||
}
|
||||
|
||||
ThreadEntity thread = threadOptional.get();
|
||||
// thread.setAgentUid(threadRequest.getAgentUid());
|
||||
thread.setState(ThreadStateEnum.STARTED.name());
|
||||
thread.setAgent(threadRequest.getAgent());
|
||||
// thread.setAcceptType(threadRequest.getAcceptType());
|
||||
// thread.setQueueNumber(threadRequest.getQueueNumber());
|
||||
//
|
||||
ThreadEntity updateThread = save(thread);
|
||||
if (updateThread == null) {
|
||||
throw new RuntimeException("thread save failed");
|
||||
}
|
||||
|
||||
// TODO: 通知queue更新,queue member更新
|
||||
// 通知queue更新,queue member更新
|
||||
bytedeskEventPublisher.publishEvent(new ThreadAcceptEvent(updateThread));
|
||||
|
||||
return convertToResponse(updateThread);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-04-23 08:51:27
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2024-12-26 09:54:19
|
||||
* @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.
|
||||
* 仅支持企业内部员工自用,严禁私自用于销售、二次销售或者部署SaaS方式销售
|
||||
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
|
||||
* contact: 270580156@qq.com
|
||||
* 联系:270580156@qq.com
|
||||
* Copyright (c) 2024 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.core.thread.event;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
import com.bytedesk.core.thread.ThreadEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ThreadAcceptEvent extends ApplicationEvent {
|
||||
|
||||
private ThreadEntity thread;
|
||||
|
||||
public ThreadAcceptEvent(ThreadEntity thread) {
|
||||
super(thread);
|
||||
this.thread = thread;
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,12 @@
|
||||
* 联系:270580156@qq.com
|
||||
* Copyright (c) 2024 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.core.thread;
|
||||
package com.bytedesk.core.thread.event;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
import com.bytedesk.core.thread.ThreadEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
Reference in New Issue
Block a user