0fb21d45360680afecbbd13f76c30b3be799a577.svn-base 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. package com.iamberry.app.mapper;
  2. import org.apache.ibatis.annotations.Param;
  3. import com.iamberry.app.core.entity.User;
  4. /**
  5. *
  6. * @author Moon Cheng
  7. * @date 2016年1月16日 下午12:25:05
  8. */
  9. public interface UserMapper {
  10. // ================================================================================================
  11. // ------------------------------------------User----------------------------------------------
  12. // ================================================================================================
  13. /**
  14. * 根据id查询user所有信息
  15. *
  16. * @param id
  17. * @return User Information
  18. */
  19. public User selectUserById(Long id);
  20. /**
  21. * 根据username查询user所有信息
  22. *
  23. * @param username
  24. * @return User Information
  25. */
  26. public User selectUserByUsername(String username);
  27. /**
  28. * 通过ext_open_id查询user所有信息
  29. *
  30. * @param extOpenId
  31. * @return User Information
  32. */
  33. public User selectUserByExtOpenId(String extOpenId);
  34. /**
  35. * 添加用户信息到user表中
  36. *
  37. * @param user
  38. */
  39. public void insertUser(User user);
  40. /**
  41. * 根据id修改user表数据
  42. *
  43. * @param user
  44. */
  45. public int updateUser(User user);
  46. /**
  47. * 根据id修改user表的个人头像
  48. *
  49. * @author Moon Cheng
  50. * @param image
  51. * @param id
  52. */
  53. public int updateDisplayPicture(String imageUrl, Long id);
  54. /**
  55. * 根据用户名和密码查询用户表信息
  56. *
  57. * @param username
  58. * @param password
  59. * @return User Information
  60. */
  61. public User validateUser(String username, String password);
  62. /**
  63. * 通过id修改用户表密码
  64. *
  65. * @param id
  66. * @param newPassword
  67. * @return update row count
  68. */
  69. public int changePassword(Long id, String newPassword);
  70. // ================================================================================================
  71. // ------------------------------------------UserToken----------------------------------------------
  72. // ================================================================================================
  73. /**
  74. * 通过token查询user表所有信息
  75. *
  76. * @param userId
  77. * @return
  78. */
  79. public User selectUserByToken(String token);
  80. /**
  81. * 根据id修改token值
  82. *
  83. * @param token
  84. * @param userId
  85. * @return int
  86. */
  87. public int updateUserToken(String token, Long userId);
  88. /**
  89. * 根据id修改user表的用户名
  90. *
  91. * @author Moon Cheng
  92. * @param username
  93. * @param userId
  94. * @return
  95. */
  96. public int updateUserName(String username, Long userId);
  97. /**
  98. * 通过key_查询sys_config表数据
  99. *
  100. * @param key
  101. * @return String
  102. */
  103. public String selectConfig(String key);
  104. // ================================================================================================
  105. // ------------------------------------------UserAvator----------------------------------------------
  106. // ================================================================================================
  107. /**
  108. * USER_AVATOR表中添加数据
  109. *
  110. * @param id
  111. * @param avator
  112. * void
  113. */
  114. public void insertUserAvator(Long id, String avator);
  115. /**
  116. * 通过user_id修改USER_AVATOR表数据
  117. *
  118. * @param id
  119. * @param avator
  120. * @return int
  121. */
  122. public int updateUserAvator(Long id, String avator);
  123. /**
  124. * 根据user_id查询USER_AVATOR表数据
  125. *
  126. * @param id
  127. * @return String
  128. */
  129. public String selectUserAvator(Long id);
  130. @Deprecated
  131. public java.util.List<User> getAll(@Param("start") int start, @Param("end") int end);
  132. }