From dc5be7d38446f70e6ff86df311119c32b41fe7f8 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 28 十一月 2020 16:37:05 +0800 Subject: [PATCH] 大淘客搜索接口升级 --- fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserAccountService.java | 479 ++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 277 insertions(+), 202 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserAccountService.java b/fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserAccountService.java index e87e56d..912efc0 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserAccountService.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserAccountService.java @@ -1,239 +1,314 @@ package com.yeshi.fanli.service.inter.user; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - +import com.yeshi.fanli.entity.SystemEnum; +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.entity.system.BusinessSystem; import com.yeshi.fanli.exception.user.UserAccountException; +import com.yeshi.fanli.vo.taobao.TaoBaoUser; +import org.yeshi.utils.entity.ProxyIP; +import org.yeshi.utils.entity.wx.WeiXinUser; + +import javax.servlet.http.HttpServletRequest; /** * 鐧诲綍鏈嶅姟 - * - * @author Administrator * + * @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 code + * @param phone + * @param wxinstall + * @param loginType + * @return + * @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; - /** - * 娌℃湁瀹夎寰俊鏃跺�欑殑鐧诲綍 - * - * @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 appId + * @param code + * @param phone + * @param tbUserInfo + * @param loginType + * @return + * @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 userInfo + */ + public void register(UserInfo userInfo) throws UserAccountException; - /** - * 鎵撻�氫袱涓处鍙凤紝浠ヤ富璐﹀彿涓轰富 - * - * @param mainUser - * @param lessUser - * @throws UserAccountException - */ - public void connectUsers(UserInfo mainUser, UserInfo lessUser) throws UserAccountException; - /** - * 娉ㄥ唽鐢ㄦ埛 - * - * @param userInfo - */ - public void register(UserInfo userInfo) throws UserAccountException; + /** + * 鏍规嵁绯荤粺涓庡井淇nionid鑾峰彇鐢ㄦ埛淇℃伅 + * + * @param system + * @param unionId + * @return + * @throws UserAccountException + */ + public UserInfo getUserInfoByWXUnionId(SystemEnum system, String unionId) throws UserAccountException; - /** - * 鏍规嵁绯荤粺涓庡井淇nionid鑾峰彇鐢ㄦ埛淇℃伅 - * - * @param appId - * @param unionId - * @return - */ - public UserInfo getUserInfoByWXUnionId(String appId, String unionId) throws UserAccountException; + /** + * 鏍规嵁绯荤粺鍜屾窐瀹濈殑Openid瀵绘壘鐢ㄦ埛 + * + * @param system + * @param openId + * @return + * @throws UserAccountException + */ + public UserInfo getUserInfoByTaoBaoOpenId(SystemEnum system, String openId) 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; + /** + * 鏍规嵁绯荤粺鍜岀數璇濆彿鐮佸鎵剧敤鎴� + * + * @param system + * @param phone + * @return + * @throws UserAccountException + */ + public UserInfo getUserInfoByPhone(SystemEnum system, String phone) throws UserAccountException; - public void addUser(UserInfo user); + public void addUser(UserInfo user); - /** - * 鏇存敼閮ㄥ垎鐢ㄦ埛淇℃伅 - * - * @param user - */ - public void updateUserSelective(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 bindPhone(Long uid, String phone) throws UserAccountException; - /** - * 瑙g粦鐢佃瘽 - * - * @param uid - * @param phone - * @throws UserAccountException - */ - public void unBindPhone(Long uid, String phone) throws UserAccountException; + /** + * 瑙g粦鐢佃瘽 + * + * @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 + * @param tbOpenId + * @param tbNickName + * @param tbPortrait + * @throws UserAccountException + */ + public void bindTaoBao(Long uid, String tbOpenId, String tbNickName, String tbPortrait) throws UserAccountException; - /** - * 瑙g粦娣樺疂 - * - * @param uid - * @throws UserAccountException - */ - public void unBindTaoBao(Long uid) throws UserAccountException; + /** + * 瑙g粦娣樺疂 + * + * @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 + * @param code + */ + public void changeWXBind(AcceptData acceptData, Long uid, String code) throws UserAccountException; - /** - * 娓呯悊鐢ㄦ埛澶村儚 - * - * @param uid - */ - public void clearUserPortrait(Long uid); + /** + * 娓呯悊鐢ㄦ埛澶村儚 + * + * @param uid + */ + public void clearUserPortrait(Long uid); - /** - * 淇鐢ㄦ埛澶村儚 - * - * @param uid - */ - public String repairPortrait(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 ipInfo + * @param loginType + * @param vcode + * @param phone + * @param businessSystem + * @return + * @throws UserAccountException + */ + @Deprecated + public UserInfo loginPhone(ProxyIP ipInfo, int loginType, String vcode, String phone, BusinessSystem businessSystem) + 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; + /** + * 娣樺疂鐧诲綍 + * + * @param ipInfo + * @param taoBaoUser -娣樺疂淇℃伅 + * @param businessSystem + * @return + * @throws UserAccountException + */ + public UserInfo loginTB(ProxyIP ipInfo, TaoBaoUser taoBaoUser, BusinessSystem businessSystem) + throws UserAccountException; - /** - * 缁戝畾鐢佃瘽鍙风爜 V1.5.3 - * @param uid - * @param phone - * @throws UserAccountException - */ - public void bindPhoneNew(Long uid, String phone) throws UserAccountException; + /** + * 寰俊鐧诲綍 1.5.3 + * + * @param ipInfo + * @param loginType + * @param code + * @param businessSystem + * @return + * @throws UserAccountException + */ + @Deprecated + public UserInfo loginWeiXin(ProxyIP ipInfo, int loginType, String code, BusinessSystem businessSystem) throws UserAccountException; - /** - * 缁戝畾寰俊 V1.5.3 - * @param uid - * @param code - * @throws UserAccountException - */ - public void bindWeiXin(Long uid, String code) throws UserAccountException; + /** + * 缁戝畾鐢佃瘽鍙风爜 V1.5.3 + * + * @param uid + * @param phone + * @throws UserAccountException + */ + public void bindPhoneNew(Long uid, String phone) throws UserAccountException; - /** - * 璐︽埛灏佺 - * @param uid - * @param reason - */ - public void forbiddenUser(Long uid, String reason); + /** + * 缁戝畾寰俊 V1.5.3 + * + * @param uid + * @param code + * @throws UserAccountException + */ + public void bindWeiXin(AcceptData acceptData, Long uid, String code) throws UserAccountException; - /** - * 灏佺鐢ㄦ埛鎵�鏈変俊鎭細鎵嬫満鍙枫�佸井淇°�佹窐瀹濄�佹敮浠樺疂 - * @param uid - * @param reason - */ - public void forbiddenUserAll(Long uid, String reason); - /** - * 鍒犻櫎璐︽埛 - * @param uid - * @param reason - */ - public void DeleteUser(Long uid, String reason); + /** + * 缁戝畾寰俊 V1.5.3 + * + * @param uid + * @param wxUser + * @throws UserAccountException + */ + public void bindWeiXin(Long uid, WeiXinUser wxUser) throws UserAccountException; - /** - * 闀挎椂闂存湭鐧诲綍璐︽埛鍒犻櫎 - * @param uid - * @param reason - */ - public void DeleteUserOutOfDate(Long uid, String reason); + + /** + * 璐︽埛灏佺 + * + * @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 ipInfo + * @param acceptData + * @param loginType + * @param wxCode + * @param appId + * @return + * @throws UserAccountException + */ + public UserInfo loginWeiXinNew(ProxyIP ipInfo, int loginType, String wxCode, + BusinessSystem businessSystem) throws UserAccountException; + + /** + * 鏈敞鍐屼箣鍓嶇粦瀹氭墜鏈哄彿 + * + * @param ipinfo + * @param acceptData + * @param phone + * @param key + * @return + * @throws UserAccountException + */ + public UserInfo bindPhoneToLogin(ProxyIP ipinfo, AcceptData acceptData, String phone, String key) + throws UserAccountException; + + /** + * 鎵嬫満鐧诲綍闇�瑕佺粦瀹氬井淇� + * + * @param ipinfo + * @param acceptData + * @param loginType + * @param vcode + * @param phone + * @param appId + * @return + * @throws UserAccountException + */ + public UserInfo loginPhoneNew(ProxyIP ipinfo, AcceptData acceptData, int loginType, String vcode, String phone, String appId) + throws UserAccountException; + + /** + * 缁戝畾寰俊鐧诲綍 + 鎵嬫満鍙穔ey + * + * @param ipInfo + * @param acceptData + * @param code + * @param appId + * @param key + * @return + * @throws UserAccountException + */ + public UserInfo bindWXToLogin(ProxyIP ipInfo, AcceptData acceptData, String code, String appId, + String key) throws UserAccountException; + } -- Gitblit v1.8.0