ChatMsgUserMapper.java 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. package com.kede.common.dao;
  2. import com.kede.common.model.ChatMsgUser;
  3. import com.kede.wechat.bo.ChatMsgUserBo;
  4. import org.apache.ibatis.annotations.Param;
  5. import java.util.List;
  6. /**
  7. * 微信会话存储对象名称(ChatMsgUser)表数据库访问层
  8. *
  9. * @author makejava
  10. * @since 2025-06-17 14:44:32
  11. */
  12. public interface ChatMsgUserMapper {
  13. /**
  14. * 通过ID查询单条数据
  15. *
  16. * @param id 主键
  17. * @return 实例对象
  18. */
  19. ChatMsgUser selectById(Integer id);
  20. /**
  21. * 查询指定行数据
  22. *
  23. * @param chatMsgUser 查询条件
  24. * @return 对象列表
  25. */
  26. List<ChatMsgUser> findChatMsgUserList(ChatMsgUser chatMsgUser);
  27. /**
  28. * 统计总行数
  29. *
  30. * @param chatMsgUser 查询条件
  31. * @return 总行数
  32. */
  33. int findChatMsgUserCount(ChatMsgUser chatMsgUser);
  34. /**
  35. * 新增数据
  36. *
  37. * @param chatMsgUser 实例对象
  38. * @return 影响行数
  39. */
  40. int insert(ChatMsgUser chatMsgUser);
  41. /**
  42. * 批量新增数据(MyBatis原生foreach方法)
  43. *
  44. * @param entities List<ChatMsgUser> 实例对象列表
  45. * @return 影响行数
  46. */
  47. int insertBatch(@Param("entities") List<ChatMsgUser> entities);
  48. /**
  49. * 批量新增或按主键更新数据(MyBatis原生foreach方法)
  50. *
  51. * @param entities List<ChatMsgUser> 实例对象列表
  52. * @return 影响行数
  53. * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
  54. */
  55. int insertOrUpdateBatch(@Param("entities") List<ChatMsgUser> entities);
  56. /**
  57. * 修改数据
  58. *
  59. * @param chatMsgUser 实例对象
  60. * @return 影响行数
  61. */
  62. int update(ChatMsgUser chatMsgUser);
  63. /**
  64. * 通过主键删除数据
  65. *
  66. * @param id 主键
  67. * @return 影响行数
  68. */
  69. int deleteById(Integer id);
  70. ChatMsgUser selectByUserId(String userId);
  71. List<ChatMsgUser> getUserList(@Param("type")Integer type);
  72. List<ChatMsgUser> selectMyIdByUser(String userId);
  73. List<ChatMsgUser> selectMyIdByRoom(String userId);
  74. }