UserService.java 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. package com.sqx.modules.app.service;
  2. import com.baomidou.mybatisplus.core.metadata.IPage;
  3. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  4. import com.baomidou.mybatisplus.extension.service.IService;
  5. import com.sqx.common.utils.PageUtils;
  6. import com.sqx.common.utils.Result;
  7. import com.sqx.modules.app.entity.UserEntity;
  8. import com.sqx.modules.app.entity.queryRiderVo;
  9. import com.sqx.modules.errand.entity.Feedback;
  10. import org.apache.poi.ss.formula.functions.T;
  11. import java.util.List;
  12. import java.util.Map;
  13. /**
  14. * 用户
  15. *
  16. * @author fang
  17. * @date 2021/2/27
  18. */
  19. public interface UserService extends IService<UserEntity> {
  20. /**
  21. * 根据手机号查询用户
  22. *
  23. * @param phone 手机号
  24. * @return
  25. */
  26. UserEntity queryByPhone(String phone);
  27. /**
  28. * 根据真实姓名查询用户
  29. *
  30. * @param realName 真实姓名
  31. * @return
  32. */
  33. List<UserEntity> queryByRealName(String realName);
  34. /**
  35. * 根据手机号和用户类型查询用户
  36. * @param phone 手机号
  37. * @param type 用户类型
  38. * @return
  39. */
  40. UserEntity queryByPhoneAndType(String phone);
  41. /**
  42. * 根据小程序微信openId查询用户
  43. *
  44. * @param openId 微信小程序openId
  45. * @return
  46. */
  47. UserEntity queryByOpenId(String openId,Integer userType);
  48. /**
  49. * 根据微信APP openId查询用户
  50. *
  51. * @param openId 微信APP openId
  52. * @return
  53. */
  54. UserEntity queryByWxOpenId(String openId,Integer userType);
  55. /**
  56. * 根据userId查询用户
  57. *
  58. * @param userId userId
  59. * @return
  60. */
  61. UserEntity queryByUserId(Long userId);
  62. UserEntity queryByInvitationCode(String invitationCode);
  63. /**
  64. * 根据用户appleId查询用户
  65. *
  66. * @param appleId
  67. * @return
  68. */
  69. UserEntity queryByAppleId(String appleId);
  70. Result wxLogin(String code,Integer type);
  71. /**
  72. * 注册或更新用户信息
  73. *
  74. * @param userInfo1 用户信息
  75. * @return 用户信息
  76. */
  77. Result wxRegister(UserEntity userInfo1);
  78. /**
  79. * 注册或更新用户信息
  80. *
  81. * @param appleId 苹果账号id
  82. * @return 用户信息
  83. */
  84. Result iosRegister(String appleId);
  85. /**
  86. * 发送验证码
  87. *
  88. * @param phone 手机号
  89. * @param state 验证码类型
  90. * @return
  91. */
  92. Result sendMsg(String phone, String state);
  93. /**
  94. * 绑定手机号
  95. *
  96. * @param phone 手机号
  97. * @param code 验证码
  98. * @return
  99. */
  100. Result wxBindMobile(String phone, String code, String wxOpenId, String token, String platform, Integer sysPhone);
  101. /**
  102. * @param phone
  103. * @param code
  104. * @param appleId
  105. * @param platform
  106. * @param sysPhone
  107. * @return
  108. */
  109. Result iosBindMobile(String phone, String code, String appleId, String platform, Integer sysPhone);
  110. /**
  111. * 换绑手机号
  112. *
  113. * @param phone 手机号
  114. * @param msg 验证码
  115. * @param userId 用户id
  116. * @return
  117. */
  118. Result updatePhone(String phone, String msg, Long userId);
  119. /**
  120. * 登录token
  121. *
  122. * @param user 用户信息
  123. * @return
  124. */
  125. Result getResult(UserEntity user);
  126. /**
  127. * app注册或h5注册
  128. *
  129. * @param phone 手机号
  130. * @param msg 验证按
  131. * @param
  132. * @param platform 来源 app h5
  133. * @return
  134. */
  135. Result registerCode(String phone, String msg, String platform, Integer sysPhone,String password,Integer type,String openId);
  136. Result wxOpenIdLogin(String openId, Integer userType);
  137. Result wxAppLogin(String wxOpenId, String token);
  138. /**
  139. * app或h5登录
  140. *
  141. * @param phone 手机号
  142. * @param pwd 密码
  143. * @return
  144. */
  145. Result login(String phone, String pwd);
  146. /**
  147. * 根据 code 获取openId
  148. *
  149. * @param code
  150. * @param userId
  151. * @return
  152. */
  153. Result getOpenId(String code, Long userId);
  154. queryRiderVo queryRider(Long userId);
  155. Result queryRiders(Integer page, Integer limit, Long userId,Integer riderStationId, String keyword);
  156. /**
  157. * 根据用户id查询用户
  158. *
  159. * @param userId 用户id
  160. * @return
  161. */
  162. UserEntity selectUserById(Long userId);
  163. int updateUserClientIdIsNull(String clientid);
  164. int updateUserRiderClientIdIsNull(String clientid);
  165. int updateUserShopClientIdIsNull(String clientid);
  166. void pushToSingle(String title, String content, String clientId);
  167. void pushToSingleRider(String title, String content, String clientId);
  168. void pushToSingleShop(String title, String content, String clientId);
  169. PageUtils selectUserPage(Integer page, Integer limit, String search, Integer sex, String platform, String sysPhone,
  170. Integer status, Integer type, String userName, Integer isVip, Integer shopAdminFlag, String nickName);
  171. int queryInviterCount(String inviterCode);
  172. int queryUserCount(int type, String date);
  173. Double queryPayMoney(int type);
  174. IPage<Map<String, Object>> queryCourseOrder(Page<Map<String, Object>> iPage, int type, String date);
  175. int userMessage(String date, int type);
  176. Result loginApp(String phone, String password);
  177. Result takingOrdersMessage(Page<Map<String, Object>> iPage, Long type, String date);
  178. Result forgetPwd(String pwd, String phone, String msg);
  179. Result selectUserList(Integer page,Integer limit,String userName);
  180. Result selectUserId(String invitationCode);
  181. Result selectUserMessage(Long userId);
  182. Result updateUserMessage(UserEntity userEntity);
  183. Result userFeedback(Long userId, Feedback feedback);
  184. Result updateShopAdminFlag(Long userId, Integer shopAdminFlag);
  185. Result sendMsgDXB(String phone, String state, int code);
  186. UserEntity getByAdminId(Long adminUserId);
  187. }