ChatMsgUserMapper.java 2.3 KB

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