LoginMapper.java 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. package com.caimei365.user.mapper;
  2. import com.caimei365.user.model.po.OperationPo;
  3. import com.caimei365.user.model.vo.ServiceProviderVo;
  4. import com.caimei365.user.model.vo.UserLoginVo;
  5. import org.apache.ibatis.annotations.Mapper;
  6. import org.apache.ibatis.annotations.Param;
  7. /**
  8. * Description
  9. *
  10. * @author : Charles
  11. * @date : 2021/3/5
  12. */
  13. @Mapper
  14. public interface LoginMapper {
  15. /**
  16. * 根据用户id获取用户
  17. *
  18. * @param userId 手机号
  19. * @return baseuser
  20. */
  21. UserLoginVo getLoginUserByUserId(@Param("userId") Integer userId);
  22. /**
  23. * 根据手机号或邮箱获取用户
  24. *
  25. * @param mobileOrEmail 手机号/邮箱
  26. * @return BaseUser
  27. */
  28. UserLoginVo getLoginUserByMobileOrEmail(@Param("mobileOrEmail") String mobileOrEmail);
  29. /**
  30. * 根据手机号获取用户
  31. *
  32. * @param mobile 手机号/邮箱
  33. * @return BaseUser
  34. */
  35. UserLoginVo getLoginUserByMobile(@Param("mobile") String mobile);
  36. /**
  37. * 根据手机号获取运营人员
  38. *
  39. * @param mobile 手机号
  40. * @return BaseUser
  41. */
  42. OperationPo getOperationByMobile(@Param("mobile") String mobile);
  43. /**
  44. * 根据openId获取协销
  45. * @param openId openId
  46. * @return BaseUser
  47. */
  48. UserLoginVo getServiceProviderUserByOpenId(@Param("openId") String openId);
  49. /**
  50. * 根据用户ID更新协销unionId
  51. * @param userId
  52. * @param unionId
  53. */
  54. void updateServiceProviderUnionId(@Param("userId") Integer userId, @Param("unionId") String unionId);
  55. /**
  56. * 根据userId获取协销
  57. * @param userId
  58. * @return
  59. */
  60. ServiceProviderVo getServiceProviderByUserId(Integer userId);
  61. /**
  62. * 根据unionId获取运营人员
  63. * @param unionId unionId
  64. * @param source
  65. * @return BaseUser
  66. */
  67. UserLoginVo getLoginUserByUnionId(@Param("unionId") String unionId, @Param("source") String source);
  68. /**
  69. * 根据openId获取运营人员
  70. * @param openId
  71. * @param source
  72. * @return
  73. */
  74. UserLoginVo getLoginUserByOpenId(@Param("openId") String openId, @Param("source") String source);
  75. /**
  76. * 根据邀请码获取运营人员
  77. * @param invitationCode
  78. * @return
  79. */
  80. UserLoginVo getOperationUserByInvitationCode(String invitationCode);
  81. /**
  82. * 根据Id获取运营人员用户信息(关联user)
  83. * @param operationId 用户Id
  84. * @return
  85. */
  86. UserLoginVo getOperationUserByOperationId(Integer operationId);
  87. /**
  88. * 根据用户ID更新运营人员openId
  89. * @param userId
  90. * @param openId
  91. */
  92. void updateOperationOpenId(@Param("userId") Integer userId, @Param("openId") String openId);
  93. /**
  94. * 根据用户ID更新运营人员unionId
  95. * @param userId
  96. * @param unionId
  97. */
  98. void updateOperationUnionId(@Param("userId") Integer userId, @Param("unionId") String unionId);
  99. /**
  100. * 根据openId获取用户Id
  101. * @param openId
  102. * @param source
  103. * @return
  104. */
  105. Integer getUserIdByOpenId(@Param("openId") String openId, @Param("source") String source);
  106. /**
  107. * 邀请码登录更新运营人员信息
  108. * @param operationPo 运营人员信息
  109. */
  110. void updateOperationByInvitation(OperationPo operationPo);
  111. /**
  112. * 解绑更新运营人员信息
  113. * @param operation 运营人员信息
  114. */
  115. void updateOperationByUnbind(OperationPo operation);
  116. /**
  117. * 根据机构名称获取机构数量
  118. *
  119. * @param clubName 机构名称
  120. * @return Integer
  121. */
  122. Integer getClubCountByClubName(String clubName);
  123. /**
  124. * 获取最大的用户Id
  125. * @return
  126. */
  127. Integer getMaxClubId();
  128. /**
  129. * 获取最大的机构Id
  130. * @return
  131. */
  132. Integer getMaxUserId();
  133. }