messagecenterserver.go 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: messagecenter.proto
  3. package server
  4. import (
  5. "context"
  6. "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/logic"
  7. "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
  8. "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
  9. )
  10. type MessageCenterServer struct {
  11. svcCtx *svc.ServiceContext
  12. messagecenter.UnimplementedMessageCenterServer
  13. }
  14. func NewMessageCenterServer(svcCtx *svc.ServiceContext) *MessageCenterServer {
  15. return &MessageCenterServer{
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. // 查询数量
  20. func (s *MessageCenterServer) Count(ctx context.Context, in *messagecenter.CountReq) (*messagecenter.CountResp, error) {
  21. l := logic.NewCountLogic(ctx, s.svcCtx)
  22. return l.Count(in)
  23. }
  24. // 用户列表查询
  25. func (s *MessageCenterServer) UserList(ctx context.Context, in *messagecenter.UserReq) (*messagecenter.UserResp, error) {
  26. l := logic.NewUserListLogic(ctx, s.svcCtx)
  27. return l.UserList(in)
  28. }
  29. // 聊天内容查询
  30. func (s *MessageCenterServer) FindMessage(ctx context.Context, in *messagecenter.MessageReq) (*messagecenter.MessageResp, error) {
  31. l := logic.NewFindMessageLogic(ctx, s.svcCtx)
  32. return l.FindMessage(in)
  33. }
  34. // 聊天保存
  35. func (s *MessageCenterServer) SaveMessage(ctx context.Context, in *messagecenter.MessageEntity) (*messagecenter.SaveMessageResp, error) {
  36. l := logic.NewSaveMessageLogic(ctx, s.svcCtx)
  37. return l.SaveMessage(in)
  38. }
  39. // 会话创建
  40. func (s *MessageCenterServer) CreateChatSession(ctx context.Context, in *messagecenter.ChatSessionReq) (*messagecenter.ChatSessionResp, error) {
  41. l := logic.NewCreateChatSessionLogic(ctx, s.svcCtx)
  42. return l.CreateChatSession(in)
  43. }
  44. // 会话关闭
  45. func (s *MessageCenterServer) CloseChatSession(ctx context.Context, in *messagecenter.CloseSessionReq) (*messagecenter.ChatSessionResp, error) {
  46. l := logic.NewCloseChatSessionLogic(ctx, s.svcCtx)
  47. return l.CloseChatSession(in)
  48. }
  49. // 创建会话并且保存信息
  50. func (s *MessageCenterServer) SaveAutoReplyMsg(ctx context.Context, in *messagecenter.SaveAutoReplyReq) (*messagecenter.MessageResp, error) {
  51. l := logic.NewSaveAutoReplyMsgLogic(ctx, s.svcCtx)
  52. return l.SaveAutoReplyMsg(in)
  53. }
  54. // 根据消息修改已读状态
  55. func (s *MessageCenterServer) UpdateReadById(ctx context.Context, in *messagecenter.ReadStateReq) (*messagecenter.CurrencyResp, error) {
  56. l := logic.NewUpdateReadByIdLogic(ctx, s.svcCtx)
  57. return l.UpdateReadById(in)
  58. }
  59. // 群组列表查询
  60. func (s *MessageCenterServer) ChatGroupList(ctx context.Context, in *messagecenter.ChatGroupListReq) (*messagecenter.ChatGroupListResp, error) {
  61. l := logic.NewChatGroupListLogic(ctx, s.svcCtx)
  62. return l.ChatGroupList(in)
  63. }
  64. // 群组新增
  65. func (s *MessageCenterServer) ChatGroupAdd(ctx context.Context, in *messagecenter.ChatGroupAddReq) (*messagecenter.CommonReq, error) {
  66. l := logic.NewChatGroupAddLogic(ctx, s.svcCtx)
  67. return l.ChatGroupAdd(in)
  68. }
  69. // 群组成员查询
  70. func (s *MessageCenterServer) ChatGroupPerson(ctx context.Context, in *messagecenter.ChatGroupPersonReq) (*messagecenter.ChatGroupPersonResp, error) {
  71. l := logic.NewChatGroupPersonLogic(ctx, s.svcCtx)
  72. return l.ChatGroupPerson(in)
  73. }
  74. // 加入群组
  75. func (s *MessageCenterServer) ChatGroupJoin(ctx context.Context, in *messagecenter.ChatGroupJoinReq) (*messagecenter.CommonReq, error) {
  76. l := logic.NewChatGroupJoinLogic(ctx, s.svcCtx)
  77. return l.ChatGroupJoin(in)
  78. }
  79. // 群组名称修改
  80. func (s *MessageCenterServer) GroupNameUpdate(ctx context.Context, in *messagecenter.GroupNameUpdateReq) (*messagecenter.CommonReq, error) {
  81. l := logic.NewGroupNameUpdateLogic(ctx, s.svcCtx)
  82. return l.GroupNameUpdate(in)
  83. }
  84. // 群任务新增
  85. func (s *MessageCenterServer) GroupNoticeAdd(ctx context.Context, in *messagecenter.GroupNoticeAddReq) (*messagecenter.CommonReq, error) {
  86. l := logic.NewGroupNoticeAddLogic(ctx, s.svcCtx)
  87. return l.GroupNoticeAdd(in)
  88. }
  89. // 群任务编辑
  90. func (s *MessageCenterServer) GroupNoticeUpdate(ctx context.Context, in *messagecenter.GroupNoticeUpdateReq) (*messagecenter.CommonReq, error) {
  91. l := logic.NewGroupNoticeUpdateLogic(ctx, s.svcCtx)
  92. return l.GroupNoticeUpdate(in)
  93. }
  94. // 群任务详情
  95. func (s *MessageCenterServer) GroupNoticeGet(ctx context.Context, in *messagecenter.ChatGroupPersonReq) (*messagecenter.GroupNoticeGetResp, error) {
  96. l := logic.NewGroupNoticeGetLogic(ctx, s.svcCtx)
  97. return l.GroupNoticeGet(in)
  98. }
  99. // 用户撤回消息
  100. func (s *MessageCenterServer) WithdrawMessage(ctx context.Context, in *messagecenter.ReadWithdrawReq) (*messagecenter.CurrencyResp, error) {
  101. l := logic.NewWithdrawMessageLogic(ctx, s.svcCtx)
  102. return l.WithdrawMessage(in)
  103. }
  104. // 用户评价回复
  105. func (s *MessageCenterServer) AppraiseMessage(ctx context.Context, in *messagecenter.AppraiseReq) (*messagecenter.CurrencyResp, error) {
  106. l := logic.NewAppraiseMessageLogic(ctx, s.svcCtx)
  107. return l.AppraiseMessage(in)
  108. }
  109. // 客服列表查询
  110. func (s *MessageCenterServer) ConversationList(ctx context.Context, in *messagecenter.ConversationReq) (*messagecenter.UserResp, error) {
  111. l := logic.NewConversationListLogic(ctx, s.svcCtx)
  112. return l.ConversationList(in)
  113. }
  114. // 群聊
  115. func (s *MessageCenterServer) GroupChat(ctx context.Context, in *messagecenter.MessageSaveReq) (*messagecenter.CommonReq, error) {
  116. l := logic.NewGroupChatLogic(ctx, s.svcCtx)
  117. return l.GroupChat(in)
  118. }