UserMapper.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. package com.dk.oauth.mapper;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.dk.oauth.entity.Company;
  4. import com.dk.oauth.entity.UserLogin;
  5. import com.dk.oauth.entity.UserWxLogin;
  6. import org.apache.ibatis.annotations.Param;
  7. import java.util.List;
  8. import java.util.Map;
  9. /**
  10. * @author : 洪旭东
  11. * @desc : UserMapper
  12. * @date : 2024-02-18 13:24
  13. */
  14. public interface UserMapper extends BaseMapper<UserLogin> {
  15. /**
  16. * @desc : 通过手机号查询
  17. * @author : 洪旭东
  18. * @date : 2024-02-18 15:21
  19. */
  20. UserLogin getByPhone(@Param("userPhone") String userPhone);
  21. /**
  22. * @desc : 通过微信ID查询
  23. * @author : 洪旭东
  24. * @date : 2024-02-20 10:39
  25. */
  26. UserLogin getByWxid(@Param("userWxid") String userWxid);
  27. /**
  28. * @desc : 注册用户
  29. * // TODO: 洪旭东 2024-02-20 密码暂时默认123
  30. * @author : 洪旭东
  31. * @date : 2024-02-20 13:19
  32. */
  33. int insert(UserWxLogin userWxLogin);
  34. /**
  35. * @desc : 通过手机号清空手机号
  36. * @author : 洪旭东
  37. * @date : 2024-02-20 14:12
  38. */
  39. int cleanPhone(@Param("userPhone") String userPhone);
  40. /**
  41. * @desc : 通过id更新微信号
  42. * @author : 洪旭东
  43. * @date : 2024-02-20 14:12
  44. */
  45. int updateWxid(@Param("userId") String userId, @Param("userWxid") String userWxid);
  46. /**
  47. * @desc : 通过id更新unionId
  48. * @author : 洪旭东
  49. * @date : 2024-02-20 14:12
  50. */
  51. int updateWxUnionid(@Param("userId") String userId, @Param("unionId") String unionId, @Param("publicOpenId") String publicOpenId);
  52. /**
  53. * @desc : 通过id更新手机号
  54. * @author : 洪旭东
  55. * @date : 2024-02-20 14:12
  56. */
  57. int updatePhone(@Param("userId") String userId, @Param("userPhone") String userPhone);
  58. /**
  59. * @desc : 更新微信用的公司
  60. * @author : 姜永辉
  61. * @date : 2024-02-20 14:12
  62. */
  63. int updateCpid(@Param("userId") String userId, @Param("currentCp") Integer currentCp,@Param("joinedCps") List<Integer> joinedCps);
  64. /**
  65. * @desc : 离职时候更新 用户的openid current_cp , "joined_cps" 缩减相应的cpid
  66. * @author : 姜永辉
  67. * @date : 2024-02-20 14:12
  68. */
  69. int updateClearOpenidFeign(@Param("userId") String userId, @Param("currentCp") Integer currentCp,@Param("joinedCps") List<Integer> joinedCps);
  70. /**
  71. * @desc : 选择公司更新微信用户的所在当前的公司
  72. * @author : 姜永辉
  73. * @date : 2024-02-20 14:12
  74. */
  75. int updateCurrentCpByWxid(@Param("userWxid") String userWxid, @Param("currentCp") Integer currentCp);
  76. /**
  77. * @desc : 通过ID查询
  78. * @author : 洪旭东
  79. * @date : 2024-02-18 15:21
  80. */
  81. UserLogin selectById(@Param("id") Integer id);
  82. /**
  83. * @desc : 插入用户状态
  84. * @author : 周兴
  85. * @date : 2024-03-14 14:12
  86. */
  87. int insertOrUpdateUserLogin(UserLogin userLogin);
  88. /**
  89. * @desc : 获取用户状态
  90. * @author : 周兴
  91. * @date : 2023/2/7 14:45
  92. */
  93. Map<String, Object> selectUserLogin(@Param("userId") String userId,String appCode);
  94. /**
  95. * @desc : 通过商户号注销当前负责人
  96. * @author : 刘尧
  97. * @date : 2024/6/21 10:21
  98. */
  99. boolean updateFlgInit(Map<String, Object> company);
  100. /**
  101. * @desc : 通过用户id更新负责人
  102. * @author : 刘尧
  103. * @date : 2024/6/21 10:43
  104. */
  105. boolean updateFlgInitById(@Param("userId")String newHeadId);
  106. }