CommunityChatMsgMapper.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package com.ruoyi.system.mapper;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.ruoyi.system.domain.CommunityChatMsg;
  4. import com.ruoyi.system.domain.vo.SysUserVo;
  5. import org.apache.ibatis.annotations.Mapper;
  6. import org.apache.ibatis.annotations.Param;
  7. import java.util.List;
  8. @Mapper
  9. public interface CommunityChatMsgMapper extends BaseMapper<CommunityChatMsg> {
  10. /**
  11. * 获取登录用户的聊天列表
  12. *
  13. * @param userId
  14. * @return
  15. */
  16. List<SysUserVo> getChatListWithLatestMessage(@Param("userId") Long userId,
  17. @Param("type") String type);
  18. /**
  19. * 获取登录用户的返图聊天列表
  20. *
  21. * @param userId
  22. * @return
  23. */
  24. List<SysUserVo> getReturnChatMessage(@Param("userId") Long userId,
  25. @Param("type") String type,
  26. @Param("searchValue") String searchValue,
  27. @Param("returnRecordIds") List<Long> returnRecordIds);
  28. /**
  29. * 获取登录用户聊天记录
  30. *
  31. * @param userId
  32. * @param otherUserId
  33. * @param type
  34. * @return
  35. */
  36. List<CommunityChatMsg> getChatMsgRecord(@Param("userId") Long userId,
  37. @Param("otherUserId") Long otherUserId,
  38. @Param("type") String type,
  39. @Param("offset") int offset,
  40. @Param("limit") int limit);
  41. }