| | |
| | | package com.yeshi.fanli.service.inter.user;
|
| | |
|
| | | import javax.servlet.http.HttpSession;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.LoginResult;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.exception.UserAccountException;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.exception.user.UserAccountException;
|
| | |
|
| | | /**
|
| | | * 登录服务
|
| | |
| | | * @return
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public LoginResult login(HttpSession session, Boolean first, String appId, String code, String phone,
|
| | | UserInfo tbUserInfo, boolean wxinstall, int loginType) throws UserAccountException;
|
| | | public LoginResult login(HttpServletRequest request, AcceptData acceptData, Boolean first, String appId,
|
| | | String code, String phone, UserInfo tbUserInfo, boolean wxinstall, int loginType)
|
| | | throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 没有安装微信时候的登录
|
| | |
| | | * @return
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public LoginResult loginNoInstallWX(String appId, String code, String phone, UserInfo tbUserInfo, int loginType)
|
| | | throws UserAccountException;
|
| | | public LoginResult loginNoInstallWX(AcceptData acceptData, String appId, String code, String phone,
|
| | | UserInfo tbUserInfo, int loginType) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 打通微信账号与其他类型的一个账号
|
| | | * |
| | | * @param session
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public void connectUsers(HttpSession session) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 备份重要的用户信息
|
| | | * |
| | | * @param uid
|
| | | */
|
| | | public String backupUserImportantInfo(Long uid);
|
| | |
|
| | | /**
|
| | | * 打通两个账号,以主账号为主
|
| | | * |
| | | * @param mainUser
|
| | | * @param lessUser
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public void connectUsers(UserInfo mainUser, UserInfo lessUser) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 注册用户
|
| | |
| | | * @param unionId
|
| | | * @return
|
| | | */
|
| | | public UserInfo getUserInfoByWXUnionId(String appId, String unionId);
|
| | | public UserInfo getUserInfoByWXUnionId(String appId, String unionId) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 根据系统和淘宝的Openid寻找用户
|
| | |
| | | * @param openId
|
| | | * @return
|
| | | */
|
| | | public UserInfo getUserInfoByTaoBaoOpenId(String appId, String openId);
|
| | | public UserInfo getUserInfoByTaoBaoOpenId(String appId, String openId) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 根据系统和电话号码寻找用户
|
| | |
| | | * @param phone
|
| | | * @return
|
| | | */
|
| | | public UserInfo getUserInfoByPhone(String appId, String phone);
|
| | | public UserInfo getUserInfoByPhone(String appId, String phone) throws UserAccountException;
|
| | |
|
| | | public void addUser(UserInfo user);
|
| | |
|
| | |
| | | * @param uid
|
| | | * @param code
|
| | | */
|
| | | public void changeWXBind(Long uid, String code) throws UserAccountException;
|
| | | public void changeWXBind(AcceptData acceptData, Long uid, String code) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 清理用户头像
|
| | |
| | | * @param uid
|
| | | */
|
| | | public String repairPortrait(Long uid);
|
| | |
|
| | | /**
|
| | | * 电话号码登录 1.5.3
|
| | | * |
| | | * @param request
|
| | | * @param first
|
| | | * @param appId
|
| | | * @param phone
|
| | | * @return
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public UserInfo loginPhone(HttpServletRequest request, int loginType, String vcode, String phone, String appId)
|
| | | throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 微信登录 1.5.3
|
| | | * |
| | | * @param request
|
| | | * @param first
|
| | | * @param appId
|
| | | * @param code
|
| | | * @param loginType
|
| | | * @return
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public UserInfo loginWinXin(HttpServletRequest request, AcceptData acceptData, int loginType, String code,
|
| | | String appId) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 绑定电话号码 V1.5.3
|
| | | * |
| | | * @param uid
|
| | | * @param phone
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public void bindPhoneNew(Long uid, String phone) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 绑定微信 V1.5.3
|
| | | * |
| | | * @param uid
|
| | | * @param code
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public void bindWeiXin(AcceptData acceptData, Long uid, String code) throws UserAccountException;
|
| | | |
| | | |
| | | /**
|
| | | * 绑定微信 V1.5.3
|
| | | * |
| | | * @param uid
|
| | | * @param code
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public void bindWeiXin( Long uid, WeiXinUser wxUser ) throws UserAccountException;
|
| | |
|
| | |
|
| | | /**
|
| | | * 账户封禁
|
| | | * |
| | | * @param uid
|
| | | * @param reason
|
| | | */
|
| | | public void forbiddenUser(Long uid, String reason);
|
| | |
|
| | | /**
|
| | | * 封禁用户所有信息:手机号、微信、淘宝、支付宝
|
| | | * |
| | | * @param uid
|
| | | * @param reason
|
| | | */
|
| | | public void forbiddenUserAll(Long uid, String reason);
|
| | |
|
| | | /**
|
| | | * 删除账户
|
| | | * |
| | | * @param uid
|
| | | * @param reason
|
| | | */
|
| | | public void DeleteUser(Long uid, String reason);
|
| | |
|
| | | /**
|
| | | * 长时间未登录账户删除
|
| | | * |
| | | * @param uid
|
| | | * @param reason
|
| | | */
|
| | | public void DeleteUserOutOfDate(Long uid, String reason);
|
| | |
|
| | | /**
|
| | | * 2.0.1 新登录方式 -微信
|
| | | * |
| | | * @param request
|
| | | * @param acceptData
|
| | | * @param loginType
|
| | | * @param wxCode
|
| | | * @param appId
|
| | | * @return
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public UserInfo loginWeiXinNew(HttpServletRequest request, AcceptData acceptData, int loginType, String wxCode,
|
| | | String appId) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 未注册之前绑定手机号
|
| | | * |
| | | * @param phone
|
| | | * @param key
|
| | | * @param appId
|
| | | * @param request
|
| | | * @return
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public UserInfo bindPhoneToLogin(String phone, String key, String appId, HttpServletRequest request)
|
| | | throws UserAccountException;
|
| | |
|
| | | }
|