Class ChatHistoryPOServiceImpl

java.lang.Object
io.github.seenings.chat.service.impl.ChatHistoryPOServiceImpl
All Implemented Interfaces:
io.github.seenings.chat.service.ChatHistoryService

@Repository public class ChatHistoryPOServiceImpl extends Object implements io.github.seenings.chat.service.ChatHistoryService
  • Constructor Details

    • ChatHistoryPOServiceImpl

      public ChatHistoryPOServiceImpl()
  • Method Details

    • fromUserIdToId

      public List<Integer> fromUserIdToId(Long fromUserId, Long toUserId, int current, int size)
      根据发送方用户和接收方用户获取聊天记录ID
      Specified by:
      fromUserIdToId in interface io.github.seenings.chat.service.ChatHistoryService
      Parameters:
      fromUserId - 发送方
      toUserId - 接收方
      current - 当前页
      size - 页大小
      Returns:
      聊天记录ID
    • idToChatContentAndTime

      public Map<Integer, io.github.seenings.chat.model.ChatContentAndTime> idToChatContentAndTime(Set<Integer> ids)
      根据ID获取聊天内容和时间
      Specified by:
      idToChatContentAndTime in interface io.github.seenings.chat.service.ChatHistoryService
      Parameters:
      ids - 聊天记录ID
      Returns:
      聊天记录ID对应聊天内容和时间
    • idToFromUserId

      public Map<Integer,Long> idToFromUserId(Set<Integer> ids)
      根据聊天记录ID获取发送方ID
      Specified by:
      idToFromUserId in interface io.github.seenings.chat.service.ChatHistoryService
      Parameters:
      ids - 聊天记录ID
      Returns:
      聊天记录ID对应发送方ID
    • idToSendTime

      public Map<Integer, LocalDateTime> idToSendTime(Set<Integer> ids)
      根据聊天记录ID获取发出时间
      Specified by:
      idToSendTime in interface io.github.seenings.chat.service.ChatHistoryService
      Parameters:
      ids - 聊天记录ID
      Returns:
      聊天记录ID对应发出时间
    • idToIsSent

      public Map<Integer,Boolean> idToIsSent(Set<Integer> ids)
      根据聊天记录ID获取是否发出
      Specified by:
      idToIsSent in interface io.github.seenings.chat.service.ChatHistoryService
      Parameters:
      ids - 聊天记录ID
      Returns:
      聊天记录ID对应是否发出
    • idToToUserId

      public Map<Integer,Long> idToToUserId(Set<Integer> ids)
      根据聊天记录ID获取接收方ID
      Specified by:
      idToToUserId in interface io.github.seenings.chat.service.ChatHistoryService
      Parameters:
      ids - 聊天记录ID
      Returns:
      聊天记录ID对应接收方ID
    • add

      public boolean add(io.github.seenings.chat.model.ChatMessage chatMessage, LocalDateTime sendTime, boolean sent)
      Specified by:
      add in interface io.github.seenings.chat.service.ChatHistoryService
    • add

      public Integer add(io.github.seenings.article.enumeration.ContentType contentType, Integer contentId, Long fromUserId, Long toUserId, Boolean sent, LocalDateTime sendTime)
      Specified by:
      add in interface io.github.seenings.chat.service.ChatHistoryService
    • setSent

      public boolean setSent(Integer id)
      Specified by:
      setSent in interface io.github.seenings.chat.service.ChatHistoryService