package com.yeshi.fanli.service.inter.user;
|
|
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpSession;
|
|
import com.yeshi.fanli.entity.bus.user.LoginResult;
|
import com.yeshi.fanli.entity.bus.user.UserInfo;
|
import com.yeshi.fanli.exception.user.UserAccountException;
|
|
/**
|
* 登录服务
|
*
|
* @author Administrator
|
*
|
*/
|
public interface UserAccountService {
|
/**
|
* 用户登录
|
*
|
* @param session
|
* @param code
|
* @param phone
|
* @param wxinstall
|
* @param loginType
|
* @return
|
* @throws UserAccountException
|
*/
|
public LoginResult login(HttpServletRequest request, Boolean first, String appId, String code, String phone,
|
UserInfo tbUserInfo, boolean wxinstall, int loginType) throws UserAccountException;
|
|
/**
|
* 没有安装微信时候的登录
|
*
|
* @param appId
|
* @param code
|
* @param phone
|
* @param tbUserInfo
|
* @param loginType
|
* @return
|
* @throws UserAccountException
|
*/
|
public LoginResult loginNoInstallWX(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 userInfo
|
*/
|
public void register(UserInfo userInfo) throws UserAccountException;
|
|
/**
|
* 根据系统与微信unionid获取用户信息
|
*
|
* @param appId
|
* @param unionId
|
* @return
|
*/
|
public UserInfo getUserInfoByWXUnionId(String appId, String unionId) throws UserAccountException;
|
|
/**
|
* 根据系统和淘宝的Openid寻找用户
|
*
|
* @param appId
|
* @param openId
|
* @return
|
*/
|
public UserInfo getUserInfoByTaoBaoOpenId(String appId, String openId) throws UserAccountException;
|
|
/**
|
* 根据系统和电话号码寻找用户
|
*
|
* @param appId
|
* @param phone
|
* @return
|
*/
|
public UserInfo getUserInfoByPhone(String appId, String phone) throws UserAccountException;
|
|
public void addUser(UserInfo user);
|
|
/**
|
* 更改部分用户信息
|
*
|
* @param user
|
*/
|
public void updateUserSelective(UserInfo user);
|
|
/**
|
* 绑定电话号码
|
*
|
* @param uid
|
* @param phone
|
* @throws UserAccountException
|
*/
|
public void bindPhone(Long uid, String phone) throws UserAccountException;
|
|
/**
|
* 解绑电话
|
*
|
* @param uid
|
* @param phone
|
* @throws UserAccountException
|
*/
|
public void unBindPhone(Long uid, String phone) throws UserAccountException;
|
|
/**
|
* 绑定淘宝
|
*
|
* @param uid
|
* @param tbOpenId
|
* @param tbNickName
|
* @param tbPortrait
|
* @throws UserAccountException
|
*/
|
public void bindTaoBao(Long uid, String tbOpenId, String tbNickName, String tbPortrait) throws UserAccountException;
|
|
/**
|
* 解绑淘宝
|
*
|
* @param uid
|
* @throws UserAccountException
|
*/
|
public void unBindTaoBao(Long uid) throws UserAccountException;
|
|
/**
|
* 更改微信绑定
|
*
|
* @param uid
|
* @param code
|
*/
|
public void changeWXBind(Long uid, String code) throws UserAccountException;
|
|
/**
|
* 清理用户头像
|
*
|
* @param uid
|
*/
|
public void clearUserPortrait(Long uid);
|
|
/**
|
* 修复用户头像
|
*
|
* @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,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(Long uid, String code) 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);
|
}
|