| | |
| | | import com.yeshi.fanli.exception.user.UserAccountException;
|
| | | import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.wx.WXMPUserLoginService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource
|
| | | private ForbiddenUserIdentifyCodeService forbiddenUserIdentifyCodeService;
|
| | |
| | | } else {// 登录
|
| | | UserInfo userInfo = userAccountService.getUserInfoByPhone(loginData.getAppId(), loginData.getPhone());
|
| | | if (userInfo != null) {// 已存在的用户
|
| | | UserInfo boss = threeSaleSerivce.getBoss(userInfo.getId());
|
| | | if (boss == null) {// 需要绑定邀请码
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(userInfo.getId());
|
| | | if (StringUtil.isNullOrEmpty(inviteCode)) {// 需要绑定邀请码
|
| | | if (loginData.getBoss() != null) {
|
| | | // 绑定上级
|
| | | return bindInviteCode(loginData.getBoss(), userInfo);
|
| | |
| | | // 通过微信网页邀请关系进来的激活生效
|
| | | threeSaleSerivce.effective(userInfo);
|
| | |
|
| | | UserInfo boss = threeSaleSerivce.getBoss(userInfo.getId());
|
| | | if (boss == null) {// 需要绑定邀请码
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(userInfo.getId());
|
| | | if (StringUtil.isNullOrEmpty(inviteCode)) {// 需要绑定邀请码
|
| | | // 提示客户端需要绑定邀请码
|
| | | return new WXMPLoginResult(WXMPLoginResult.CODE_BIND_INVITE_CODE, userInfo);
|
| | | }
|