LoginService.java 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. package com.caimei365.user.service;
  2. import com.caimei365.user.model.ResponseJson;
  3. import com.caimei365.user.model.dto.AuthBindDto;
  4. import com.caimei365.user.model.dto.LoginCodeDto;
  5. import com.caimei365.user.model.dto.LoginPasswordDto;
  6. import com.caimei365.user.model.dto.ScanBindDto;
  7. import com.caimei365.user.model.vo.MessageCenter;
  8. import com.caimei365.user.model.vo.UserLoginVo;
  9. import com.github.pagehelper.PageInfo;
  10. import org.springframework.http.HttpHeaders;
  11. import java.text.ParseException;
  12. import java.util.List;
  13. import java.util.Map;
  14. /**
  15. * Description
  16. *
  17. * @author : Charles
  18. * @date : 2021/3/8
  19. */
  20. public interface LoginService {
  21. /**
  22. * 登录(用户名,密码)
  23. *
  24. * @param loginPasswordDto {
  25. * mobileOrEmail 手机号或邮箱
  26. * password 密码
  27. * unionId 微信unionId
  28. * }
  29. * @return BaseUser
  30. */
  31. ResponseJson<UserLoginVo> passwordLogin(LoginPasswordDto loginPasswordDto) throws ParseException;
  32. /**
  33. * 登录(用户名,密码)
  34. *
  35. * @param loginPasswordDto {
  36. * mobileOrEmail 手机号或邮箱
  37. * password 密码
  38. * unionId 微信unionId
  39. * }
  40. * @return BaseUser
  41. */
  42. ResponseJson<UserLoginVo> passwordOrganizeLogin(LoginPasswordDto loginPasswordDto) throws ParseException;
  43. /**
  44. *
  45. * @param loginCodeDto {
  46. * mobile 手机号
  47. * code 短信验证码
  48. * }
  49. * @return
  50. * @throws ParseException
  51. */
  52. ResponseJson<UserLoginVo> codeLogin(LoginCodeDto loginCodeDto) throws ParseException;
  53. /**
  54. *
  55. * @param loginCodeDto {
  56. * mobile 手机号
  57. * code 短信验证码
  58. * }
  59. * @return
  60. * @throws ParseException
  61. */
  62. ResponseJson<UserLoginVo> codeOrganizeLogin(LoginCodeDto loginCodeDto) throws ParseException;
  63. /**
  64. * 微信授权登录(小程序)
  65. *
  66. * @param code 微信授权code
  67. * @param encryptedData 微信加密数据
  68. * @param iv 加密算法的初始向量
  69. * @return BaseUser
  70. */
  71. ResponseJson<UserLoginVo> appletsAuthorization(String code, String encryptedData, String iv, HttpHeaders headers) throws ParseException;
  72. /**
  73. * 微信授权登录(小程序) 组织
  74. *
  75. * @param code 微信授权code
  76. * @param encryptedData 微信加密数据
  77. * @param iv 加密算法的初始向量
  78. * @return BaseUser
  79. */
  80. ResponseJson<UserLoginVo> appletsOrganizeAuthorization(String code, String encryptedData, String iv, HttpHeaders headers) throws ParseException;
  81. ResponseJson<PageInfo<MessageCenter>> SpMessageList(Integer commonId,Integer messageType,Integer source,Integer type, int pageNum, int pageSize);
  82. ResponseJson<PageInfo<MessageCenter>> ClubMessageList(Integer commonId,Integer messageType,Integer source, int pageNum, int pageSize);
  83. /**
  84. * 推送访问(站内信) 记录
  85. * @param userId
  86. * @param link
  87. * @return
  88. */
  89. ResponseJson clubBehaviorInfo(Integer userId, String link);
  90. ResponseJson<PageInfo<MessageCenter>> shopMessageList(Integer commonId,Integer messageType,Integer source, int pageNum, int pageSize);
  91. ResponseJson<PageInfo<MessageCenter>> messageList(Integer commonId,Integer messageType,Integer userType, int pageNum, int pageSize);
  92. ResponseJson<Map<String, Object>> messageCount(Integer userType ,Integer commonId);
  93. ResponseJson<Map<String, Object>> count(Integer userType,Integer messageType,Integer commonId);
  94. ResponseJson<Map<String, Object>> ClubMessageCount(Integer messageType,Integer commonId);
  95. ResponseJson<Map<String, Object>> shopMessageCount(Integer messageType,Integer commonId);
  96. ResponseJson<Map<String, Object>> SpCount(Integer messageType,Integer commonId);
  97. ResponseJson<Map<String, Object>> ShopCount(Integer messageType,Integer commonId);
  98. ResponseJson<Map<String, Object>> ClubCount(Integer messageType,Integer commonId);
  99. Integer updateMessageAsRead(Integer userType,Integer messageType,Integer commonId);
  100. Integer updateRead(Integer userType,String Id);
  101. Integer deleteMessage(String id);
  102. /**
  103. * 微信公众号授权链接(www)
  104. *
  105. * @param redirectUri 用于微信授权的中间页面
  106. * @param mode 授权方式:1静默授权,其他手动同意授权
  107. */
  108. ResponseJson<String> getAuthorizationLink(String redirectUri, Integer mode);
  109. /**
  110. * 微信公众号授权登录(www)
  111. *
  112. * spi旧接口:user/authorizationLogin
  113. *
  114. * @param code 微信code
  115. * @param state 安全认证
  116. * @param mode 1:静默授权,2:用户手动授权
  117. */
  118. ResponseJson<UserLoginVo> websiteAuthorization(String code, String state, Integer mode, HttpHeaders headers);
  119. /**
  120. * 获取生成微信二维码的参数(www)
  121. *
  122. * @return Map<String, Object>
  123. */
  124. ResponseJson<Map<String, String>> getAuthParameters();
  125. /**
  126. * 微信用户扫码,微信服务器回调
  127. *
  128. * @param code 微信code
  129. * @param state 安全认证key(上一步获取参数时自定义生成的uuid)
  130. */
  131. void qrCodeAuthScan(String code, String state);
  132. /**
  133. * 校验扫码结果
  134. *
  135. * @param state 安全认证key(第一步获取参数时自定义生成的uuid)
  136. * @return UserLoginVo
  137. */
  138. ResponseJson<UserLoginVo> qrCodeAuthScanResult(String state) throws ParseException;
  139. /**
  140. * 微信扫码后,绑定机构账号
  141. *
  142. * @param scanBindDto {
  143. * mobileOrEmail 手机号或邮箱
  144. * password 密码
  145. * mobile 手机号
  146. * smsCode 手机验证码
  147. * linkName 联系人
  148. * }
  149. */
  150. ResponseJson<UserLoginVo> qrCodeAuthScanBind(ScanBindDto scanBindDto);
  151. /**
  152. * 邀请码登录
  153. *
  154. * @param invitationCode 邀请码
  155. * @param nickName 微信昵称
  156. * @param avatarUrl 微信头像(headimgurl)
  157. * @param unionId 微信unionId
  158. * @return UserLoginVo
  159. */
  160. ResponseJson<UserLoginVo> invitationCodeLogin(String invitationCode, String nickName, String avatarUrl, String unionId);
  161. /**
  162. * 邀请码登录
  163. *
  164. * @param invitationCode 邀请码
  165. * @param nickName 微信昵称
  166. * @param avatarUrl 微信头像(headimgurl)
  167. * @param unionId 微信unionId
  168. * @param organizeId 组织Id
  169. * @return UserLoginVo
  170. */
  171. ResponseJson<UserLoginVo> invitationCodeOrganizeLogin(String invitationCode, String nickName, String avatarUrl, String unionId, Integer organizeId);
  172. /**
  173. * 运营人员绑定微信
  174. *
  175. * @param authBindDto {
  176. * userId 要绑定的用户Id(userID)
  177. * mobile 手机号
  178. * smsCode 手机验证码(verificationCode)
  179. * unionId 微信unionId
  180. * nickName 微信昵称
  181. * avatarUrl 微信头像(headimgurl)
  182. * }
  183. * @return OperationPo
  184. */
  185. ResponseJson<UserLoginVo> operationBindWeChat(AuthBindDto authBindDto);
  186. /**
  187. * 绑定运营人员短信验证
  188. * @param loginCodeDto{
  189. * mobile 手机号
  190. * code 短信验证码
  191. * }
  192. * @return
  193. */
  194. ResponseJson<String> operateVerification(LoginCodeDto loginCodeDto);
  195. /**
  196. * 修改消息
  197. * @param messageCenter
  198. * @return
  199. */
  200. Integer updateMessageCenter(MessageCenter messageCenter);
  201. /**
  202. * 新增消息
  203. * @param messageCenter
  204. * @return
  205. */
  206. Integer insertMessageCenter(MessageCenter messageCenter);
  207. List<Integer> getMessageCenterListDay(Integer day);
  208. }