From b25d0ab80d1a0394e58b2d0254ede07838ed2ceb Mon Sep 17 00:00:00 2001 From: weizhihong Date: Thu, 11 Aug 2022 08:50:27 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=9A=E8=AF=9D=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/ATS/operation/Operation.java | 33 +++++++- .../ConversationOperateHandler.java | 82 +++++++++++++++++++ 2 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 src/main/java/club/joylink/rtss/simulation/cbtc/conversation/ConversationOperateHandler.java diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java index da31f768b..720bbb195 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java @@ -35,7 +35,6 @@ public class Operation { public final static int FAULT = 1; public final static int OTHER = 2; - /** * 操作类型 */ @@ -1316,7 +1315,37 @@ public class Operation { /** * 给出票据 */ - RAIL_GIVE_TICKET_TO(Operation.OTHER); + RAIL_GIVE_TICKET_TO(Operation.OTHER), + + //----------------------------会话信息------------------------------ + /** + * 获取会话信息 + */ + Conversation_Get_Info(Operation.CLIENT), + /** + * 会话列表信息 + */ + Conversation_List(Operation.CLIENT), + /** + * 发起会话 + */ + Conversation_Start(Operation.CLIENT), + /** + * 接受会话 + */ + Conversation_Accept(Operation.CLIENT), + /** + * 结束会话 + */ + Conversation_Over(Operation.CLIENT), + /** + * 发送会话消息(语音输入) + */ + Conversation_Chat_Audio(Operation.CLIENT), + /** + * 发送会话消息(文字输入) + */ + Conversation_Chat_Text(Operation.CLIENT); int index; diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/conversation/ConversationOperateHandler.java b/src/main/java/club/joylink/rtss/simulation/cbtc/conversation/ConversationOperateHandler.java new file mode 100644 index 000000000..ee629da58 --- /dev/null +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/conversation/ConversationOperateHandler.java @@ -0,0 +1,82 @@ +package club.joylink.rtss.simulation.cbtc.conversation; + +import club.joylink.rtss.simulation.cbtc.ATS.operation.Operation; +import club.joylink.rtss.simulation.cbtc.ATS.operation.annotation.OperateHandler; +import club.joylink.rtss.simulation.cbtc.ATS.operation.annotation.OperateHandlerMapping; +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.data.vo.ConversationVO; +import club.joylink.rtss.simulation.cbtc.member.SimulationMember; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + +/** + * 会话操作 + */ +@OperateHandler +@Slf4j +public class ConversationOperateHandler { + @Autowired + private ConversationManagerService conversationManagerService; + + /** + * 获取会话信息 + */ + @OperateHandlerMapping(type = Operation.Type.Conversation_Get_Info) + public ConversationVO getConversation(Simulation simulation, SimulationMember member, String id){ + return null; + } + + /** + * 会话列表信息 + */ + @OperateHandlerMapping(type = Operation.Type.Conversation_List) + public List getAllConversations(Simulation simulation, SimulationMember member){ + return null; + } + + /** + * 发起会话 + */ + @OperateHandlerMapping(type = Operation.Type.Conversation_Start) + public ConversationVO startConversation(Simulation simulation, SimulationMember member + , CommunicationObject object, List memberIds){ + + return null; + } + + /** + * 接受会话 + */ + @OperateHandlerMapping(type = Operation.Type.Conversation_Accept) + public ConversationVO acceptConversationInvite(Simulation simulation, SimulationMember member, String id){ + return null; + } + + /** + * 结束会话 + */ + @OperateHandlerMapping(type = Operation.Type.Conversation_Over) + public ConversationVO overConversation(Simulation simulation, SimulationMember member, String id){ + return null; + } + + /** + * 发送会话消息(语音输入) + */ + @OperateHandlerMapping(type = Operation.Type.Conversation_Chat_Audio) + public ConversationVO audioChat(Simulation simulation, SimulationMember member, String id){ + return null; + } + + /** + * 发送会话消息(文字输入) + */ + @OperateHandlerMapping(type = Operation.Type.Conversation_Chat_Text) + public ConversationVO textChat(Simulation simulation, SimulationMember member, String id){ + return null; + } + +}