yujian
2019-12-25 a3ead770c30b310b9b1b7e3786d5d847da540e55
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -2127,6 +2127,7 @@
         }
         data.put("moduleState", mySettings);
         int tailor = 0;
         int welfareCenterNews = 0;
         String invitCode = null;
         UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
@@ -2136,8 +2137,10 @@
            }
            // vip邀请码优先
            if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCodeVip())) {
               tailor = 1;
               invitCode = userInfoExtra.getInviteCodeVip();
            } else if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode())) {
               tailor = 2;
               invitCode = userInfoExtra.getInviteCode();
            }
            
@@ -2159,6 +2162,8 @@
               if (!StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin()))
                  userInfo.setWeiXin(userInfoExtra.getWeiXin());
            }
            data.put("erCode", userInfoExtra.getErCode());
         }
         // 1.6.5 之后返回 微信号提示
         if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
@@ -2191,6 +2196,28 @@
            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);
               if(tailor == 2) {
                  long firstTeam = threeSaleSerivce.countFirstTeam(uid, 1);
                  if (firstTeam >= 2) {
                     data.put("tailor", true);
                  }
               } else {
                  data.put("tailor", false);
               }
            }
         }
         out.print(JsonUtil.loadTrueResult(data));
@@ -2304,7 +2331,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, PrintWriter out) {
      try {
         if (uid == null) {
            out.print(JsonUtil.loadFalseResult("用户未登录"));
@@ -2379,6 +2406,14 @@
               return;
            }
         }
         // 二维码
         if (qrCodeFile != null) {
            userInfoExtraService.uploadERCode(qrCodeFile, uid);
         }
         out.print(JsonUtil.loadTrueResult("保存成功"));
      } catch (UserInfoException e) {
         out.print(JsonUtil.loadFalseResult(e.getMsg()));