| | |
| | | welfareCenterNews = userInfoExtra.getCouponNews();
|
| | | }
|
| | |
|
| | | if (userInfoExtra.getInviteCode() != null && userInfoExtra.getInviteCode().trim().length() > 0) {
|
| | | if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCodeVip())) {
|
| | | invitCode = userInfoExtra.getInviteCodeVip();
|
| | | } else {
|
| | | invitCode = userInfoExtra.getInviteCode();
|
| | | }
|
| | | }
|
| | |
| | | final UserInfo uuser = user;
|
| | | ThreadUtil.run(new Runnable() {
|
| | | public void run() {
|
| | |
|
| | | try {
|
| | | // 获取邀请码:若无邀请码且存在有效的队员关系 则自动生成邀请码
|
| | | userInfoExtraService.getUserInviteCode(uuser.getId());
|
| | | } catch (UserInfoExtraException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | // 获取邀请码:若无邀请码且存在有效的队员关系 则自动生成邀请码
|
| | | userInfoExtraService.getInviteCodeByUid(uuser.getId());
|
| | |
|
| | | LogHelper.userInfo(GsonUtil.toJsonExpose(uuser));
|
| | | uuser.setLastLoginIp(remotIP);
|
| | |
| | | } else if (etype == 111) {
|
| | | out.print(JsonUtil.loadFalseResult("修改手机号后,7天内无法提现"));
|
| | | } else if (etype == 110) {
|
| | | out.print(JsonUtil.loadFalseResult("有维权订单尚未扣款"));
|
| | | out.print(JsonUtil.loadFalseResult("有售后订单尚未扣款"));
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | boolean hasCode = false;
|
| | | String inviteCode = userInfoExtraService.getUserInviteCode(uid);
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | if (inviteCode != null && inviteCode.trim().length() > 0) {
|
| | | hasCode = true; // 已有邀请码
|
| | | } else {
|
| | |
| | | resultData.put("boss", bossData);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(resultData));
|
| | | } catch (UserInfoExtraException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("统计失败"));
|
| | | e.printStackTrace();
|
| | |
| | | }
|
| | |
|
| | | boolean hasCode = false;
|
| | | String inviteCode = userInfoExtraService.getUserInviteCode(uid);
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | if (inviteCode != null && inviteCode.trim().length() > 0) {
|
| | | hasCode = true; // 已有邀请码
|
| | | } else {
|
| | |
| | | resultData.put("boss", bossData);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(resultData));
|
| | | } catch (UserInfoExtraException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("统计失败"));
|
| | | e.printStackTrace();
|
| | |
| | | resultData.put("boss", bossData);
|
| | |
|
| | | boolean hasCode = false;
|
| | | String inviteCode = userInfoExtraService.getUserInviteCode(uid);
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | if (inviteCode != null && inviteCode.trim().length() > 0) {
|
| | | hasCode = true; // 已有邀请码
|
| | | } else {
|
| | |
| | |
|
| | | out.print(JsonUtil.loadTrueResult(resultData));
|
| | |
|
| | | } catch (UserInfoExtraException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("统计失败"));
|
| | | e.printStackTrace();
|
| | |
| | |
|
| | | try {
|
| | |
|
| | | String inviteCode = userInfoExtraService.getUserInviteCode(uid);
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | |
|
| | | JSONObject inviteData = new JSONObject();
|
| | | if (inviteCode == null || inviteCode.trim().length() == 0) {
|
| | |
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (UserInfoExtraException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("获取失败"));
|
| | | e.printStackTrace();
|
| | |
| | | if (userInfoExtra.getCouponNews() != null) {
|
| | | welfareCenterNews = userInfoExtra.getCouponNews();
|
| | | }
|
| | |
|
| | | if (userInfoExtra.getInviteCode() != null && userInfoExtra.getInviteCode().trim().length() > 0) {
|
| | | // vip邀请码优先
|
| | | if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCodeVip())) {
|
| | | invitCode = userInfoExtra.getInviteCodeVip();
|
| | | } else if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode())) {
|
| | | invitCode = userInfoExtra.getInviteCode();
|
| | | }
|
| | |
|
| | | |
| | | if (userInfoExtra.getUserRank() != null) {
|
| | | String picture = userInfoExtra.getUserRank().getPicture();
|
| | | String icon = userInfoExtra.getUserRank().getIcon();
|
| | |
| | | }
|
| | | // 1.6.5 之后返回 微信号提示
|
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | userInfo.setWeiXinTip("添加微信号后,你的邀请人和一级队员可以通过微信与你建立联系。");
|
| | | userInfo.setWeiXinTip("添加微信号后,你的邀请人和直接粉丝可以通过微信与你建立联系。");
|
| | |
|
| | | // 查询是否为VIP
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | |
| | |
|
| | | data.put("user", JsonUtil.getConvertBigDecimalToStringBuilder(gsonBuilder).create().toJson(userInfo));
|
| | | data.put("invitCode", invitCode); // 邀请码
|
| | | if (userInfoExtra.getInviteCodeState() != null
|
| | | && userInfoExtra.getInviteCodeState() == UserInfoExtra.INVITE_CODE_SATTE_VALID_UPDATED)
|
| | | if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCodeVip()))
|
| | | data.put("invitCodeUpdated", true);// 邀请码是否已经修改过
|
| | | else
|
| | | data.put("invitCodeUpdated", false);
|
| | |
| | | final UserInfo uuser = userInfo;
|
| | | ThreadUtil.run(new Runnable() {
|
| | | public void run() {
|
| | | try {
|
| | | // 获取邀请码:若无邀请码且存在有效的队员关系 则自动生成邀请码
|
| | | userInfoExtraService.getUserInviteCode(uuser.getId());
|
| | | } catch (UserInfoExtraException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | // 获取邀请码:若无邀请码且存在有效的队员关系 则自动生成邀请码
|
| | | userInfoExtraService.getInviteCodeByUid(uuser.getId());
|
| | |
|
| | | // 更新用户附加信息,老用户不存在的需要添加
|
| | | try {
|
| | |
| | |
|
| | | if (!StringUtil.isNullOrEmpty(inviteCode)) {// 邀请码不为空
|
| | | inviteCode = inviteCode.trim();
|
| | | if (inviteCode.length() >= 6 && inviteCode.length() <= 12) {
|
| | | if (inviteCode.length() >= 4 && inviteCode.length() <= 12) {
|
| | |
|
| | | if (!userVIPInfoService.isVIP(uid)) {
|
| | | out.print(JsonUtil.loadFalseResult(20, "只有超级会员才能修改"));
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | userInfoExtraService.updateInviteCode(inviteCode, uid);
|
| | | userInfoExtraService.updateInviteCodeVip(inviteCode, uid);
|
| | | out.print(JsonUtil.loadTrueResult("保存成功"));
|
| | | return;
|
| | | } catch (UserInfoExtraException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMessage()));
|
| | | }
|
| | | } else {
|
| | | out.print(JsonUtil.loadFalseResult(1, "邀请码必须为6到12位"));
|
| | | out.print(JsonUtil.loadFalseResult(1, "邀请码必须为4到12位"));
|
| | | return;
|
| | | }
|
| | | }
|