admin
2019-12-28 64a8f7a3be0a5584fe2164a2474b189c79cfab5c
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -631,7 +631,9 @@
            welfareCenterNews = userInfoExtra.getCouponNews();
         }
         if (userInfoExtra.getInviteCode() != null && userInfoExtra.getInviteCode().trim().length() > 0) {
         if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCodeVip())) {
            invitCode = userInfoExtra.getInviteCodeVip();
         } else {
            invitCode = userInfoExtra.getInviteCode();
         }
      }
@@ -2125,6 +2127,7 @@
         }
         data.put("moduleState", mySettings);
         boolean tailor = false;
         int welfareCenterNews = 0;
         String invitCode = null;
         UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
@@ -2132,11 +2135,14 @@
            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())) {
               tailor = true;
               invitCode = userInfoExtra.getInviteCode();
            }
            if (userInfoExtra.getUserRank() != null) {
               String picture = userInfoExtra.getUserRank().getPicture();
               String icon = userInfoExtra.getUserRank().getIcon();
@@ -2155,14 +2161,23 @@
               if (!StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin()))
                  userInfo.setWeiXin(userInfoExtra.getWeiXin());
            }
            // 二维码
            userInfo.setErCode(userInfoExtra.getErCode());
         }
         // 显示邀请码特制入口
         data.put("tailor", tailor);
         // 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())) {
         if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
            userInfo.setVip(userVIPInfoService.isVIP(uid));
            boolean verifyForbid = redPackForbidService.verifyForbid(uid);
            data.put("redPackLock", verifyForbid);
         }
         data.put("user", JsonUtil.getConvertBigDecimalToStringBuilder(gsonBuilder).create().toJson(userInfo));
@@ -2181,13 +2196,20 @@
               bindPhone = bindRemindService.bindRemind(uid, BindRemind.TYPE_PHONE);
            data.put("bindPhone", bindPhone);
         }
         // 2.0.2 版本
         if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
            boolean verifyForbid = redPackForbidService.verifyForbid(uid);
            data.put("redPackLock", verifyForbid);
         if  (!StringUtil.isNullOrEmpty(invitCode)) {
            // 2.0.6 返回邀请人
            if (VersionUtil.greaterThan_2_0_6(acceptData.getPlatform(), acceptData.getVersion())) {
               String bossName = "";
               ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid);
               if (threeSale != null && threeSale.getBoss() != null) {
                  bossName = threeSale.getBoss().getNickName();
               }
               data.put("bossName", bossName);
            }
         }
         out.print(JsonUtil.loadTrueResult(data));
         final UserInfo uuser = userInfo;
@@ -2300,7 +2322,7 @@
    */
   @RequestMapping(value = "saveInfo")
   public void saveInfo(AcceptData acceptData, String nickName, String weiXin, Integer sex, Long uid,
         String inviteCode, PrintWriter out) {
         String inviteCode, MultipartFile qrCodeFile, HttpServletRequest request, PrintWriter out) {
      try {
         if (uid == null) {
            out.print(JsonUtil.loadFalseResult("用户未登录"));
@@ -2375,6 +2397,14 @@
               return;
            }
         }
         // 二维码
         if (qrCodeFile != null) {
            userInfoExtraService.uploadERCode(qrCodeFile, uid);
         }
         out.print(JsonUtil.loadTrueResult("保存成功"));
      } catch (UserInfoException e) {
         out.print(JsonUtil.loadFalseResult(e.getMsg()));