UserServiceMapper.java 2.1 KB

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