UserMapper.java 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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更新手机号
  48. * @author : 洪旭东
  49. * @date : 2024-02-20 14:12
  50. */
  51. int updatePhone(@Param("userId") String userId, @Param("userPhone") String userPhone);
  52. /**
  53. * @desc : 更新微信用的公司
  54. * @author : 姜永辉
  55. * @date : 2024-02-20 14:12
  56. */
  57. int updateCpid(@Param("userId") String userId, @Param("currentCp") Integer currentCp,@Param("joinedCps") List<Integer> joinedCps);
  58. /**
  59. * @desc : 通过ID查询
  60. * @author : 洪旭东
  61. * @date : 2024-02-18 15:21
  62. */
  63. UserLogin selectById(@Param("cpId") Integer cpId);
  64. /**
  65. * @desc : 插入用户状态
  66. * @author : 周兴
  67. * @date : 2024-03-14 14:12
  68. */
  69. int insertOrUpdateUserLogin(UserLogin userLogin);
  70. /**
  71. * @desc : 获取用户状态
  72. * @author : 周兴
  73. * @date : 2023/2/7 14:45
  74. */
  75. Map<String, Object> selectUserLogin(@Param("userId") String userId,String appCode);
  76. }