LoginMapper.java 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. package com.caimei365.user.mapper;
  2. import com.caimei365.user.model.po.OperationPo;
  3. import com.caimei365.user.model.vo.UserLoginVo;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. /**
  7. * Description
  8. *
  9. * @author : Charles
  10. * @date : 2021/3/5
  11. */
  12. @Mapper
  13. public interface LoginMapper {
  14. /**
  15. * 根据用户id获取用户
  16. *
  17. * @param userId 手机号
  18. * @return baseuser
  19. */
  20. UserLoginVo getLoginUserByUserId(@Param("userId") Integer userId);
  21. /**
  22. * 根据手机号或邮箱获取用户
  23. *
  24. * @param mobileOrEmail 手机号/邮箱
  25. * @return BaseUser
  26. */
  27. UserLoginVo getLoginUserByMobileOrEmail(@Param("mobileOrEmail") String mobileOrEmail);
  28. /**
  29. * 根据手机号获取运营人员
  30. *
  31. * @param mobile 手机号
  32. * @return BaseUser
  33. */
  34. OperationPo getOperationByMobile(@Param("mobile") String mobile);
  35. /**
  36. * 根据openId获取协销
  37. * @param openId openId
  38. * @return BaseUser
  39. */
  40. UserLoginVo getServiceProviderByOpenId(@Param("openId") String openId);
  41. /**
  42. * 根据用户ID更新协销unionId
  43. * @param userId
  44. * @param unionId
  45. */
  46. void updateServiceProviderUnionId(@Param("userId") Integer userId, @Param("unionId") String unionId);
  47. /**
  48. * 根据unionId获取运营人员
  49. * @param unionId unionId
  50. * @param source
  51. * @return BaseUser
  52. */
  53. UserLoginVo getOperationUserByUnionId(@Param("unionId") String unionId, @Param("source") String source);
  54. /**
  55. * 根据openId获取运营人员
  56. * @param openId
  57. * @param source
  58. * @return
  59. */
  60. UserLoginVo getOperationUserByOpenId(@Param("openId") String openId, @Param("source") String source);
  61. /**
  62. * 根据openId获取运营人员
  63. * @param openId
  64. * @param source
  65. * @param invitationCode
  66. * @return
  67. */
  68. UserLoginVo getOperationUserByInvitationCode(String invitationCode);
  69. /**
  70. * 根据用户ID更新运营人员openId
  71. * @param userId
  72. * @param openId
  73. */
  74. void updateOperationOpenId(@Param("userId") Integer userId, @Param("openId") String openId);
  75. /**
  76. * 根据用户ID更新运营人员unionId
  77. * @param userId
  78. * @param unionId
  79. */
  80. void updateOperationUnionId(@Param("userId") Integer userId, @Param("unionId") String unionId);
  81. /**
  82. * 根据openId获取用户Id
  83. * @param openId
  84. * @param source
  85. * @return
  86. */
  87. Integer getUserIdByOpenId(@Param("openId") String openId, @Param("source") String source);
  88. void updateOperationByInvitation(OperationPo operationPo);
  89. void updateOperationByUnbind(OperationPo operation);
  90. }